OLD | NEW |
1 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*- | 1 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*- |
2 * This Source Code Form is subject to the terms of the Mozilla Public | 2 * This Source Code Form is subject to the terms of the Mozilla Public |
3 * License, v. 2.0. If a copy of the MPL was not distributed with this | 3 * License, v. 2.0. If a copy of the MPL was not distributed with this |
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
5 | 5 |
6 package org.mozilla.gecko.toolbar; | 6 package org.mozilla.gecko.toolbar; |
7 | 7 |
8 import java.util.ArrayList; | 8 import java.util.ArrayList; |
9 import java.util.EnumSet; | 9 import java.util.EnumSet; |
10 import java.util.List; | 10 import java.util.List; |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 menuIcon = (ThemedImageView) findViewById(R.id.menu_icon); | 196 menuIcon = (ThemedImageView) findViewById(R.id.menu_icon); |
197 hasSoftMenuButton = !HardwareUtils.hasMenuButton(); | 197 hasSoftMenuButton = !HardwareUtils.hasMenuButton(); |
198 | 198 |
199 // The focusOrder List should be filled by sub-classes. | 199 // The focusOrder List should be filled by sub-classes. |
200 focusOrder = new ArrayList<View>(); | 200 focusOrder = new ArrayList<View>(); |
201 | 201 |
202 final Resources res = getResources(); | 202 final Resources res = getResources(); |
203 shadowSize = res.getDimensionPixelSize(R.dimen.browser_toolbar_shadow_si
ze); | 203 shadowSize = res.getDimensionPixelSize(R.dimen.browser_toolbar_shadow_si
ze); |
204 | 204 |
205 shadowPaint = new Paint(); | 205 shadowPaint = new Paint(); |
206 shadowColor = ColorUtils.getColor(context, R.color.url_bar_shadow); | 206 // Using ABB color for toolbar divider. See https://issues.adblockplus.o
rg/ticket/3769 |
207 shadowPrivateColor = ColorUtils.getColor(context, R.color.url_bar_shadow
_private); | 207 shadowColor = ColorUtils.getColor(context, R.color.abb_text_divider_grey
); |
| 208 shadowPrivateColor = ColorUtils.getColor(context, R.color.abb_text_divid
er_grey); |
208 shadowPaint.setColor(shadowColor); | 209 shadowPaint.setColor(shadowColor); |
209 shadowPaint.setStrokeWidth(0.0f); | 210 shadowPaint.setStrokeWidth(0.0f); |
210 | 211 |
211 setUIMode(UIMode.DISPLAY); | 212 setUIMode(UIMode.DISPLAY); |
212 | 213 |
213 prefs = new ToolbarPrefs(); | 214 prefs = new ToolbarPrefs(); |
214 urlDisplayLayout.setToolbarPrefs(prefs); | 215 urlDisplayLayout.setToolbarPrefs(prefs); |
215 urlEditLayout.setToolbarPrefs(prefs); | 216 urlEditLayout.setToolbarPrefs(prefs); |
216 | 217 |
217 setOnCreateContextMenuListener(new View.OnCreateContextMenuListener() { | 218 setOnCreateContextMenuListener(new View.OnCreateContextMenuListener() { |
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
826 return url; | 827 return url; |
827 } | 828 } |
828 | 829 |
829 @Override | 830 @Override |
830 public void setPrivateMode(boolean isPrivate) { | 831 public void setPrivateMode(boolean isPrivate) { |
831 super.setPrivateMode(isPrivate); | 832 super.setPrivateMode(isPrivate); |
832 | 833 |
833 tabsButton.setPrivateMode(isPrivate); | 834 tabsButton.setPrivateMode(isPrivate); |
834 menuButton.setPrivateMode(isPrivate); | 835 menuButton.setPrivateMode(isPrivate); |
835 urlEditLayout.setPrivateMode(isPrivate); | 836 urlEditLayout.setPrivateMode(isPrivate); |
| 837 // Changing color in private mode. See https://issues.adblockplus.org/ti
cket/3769 |
| 838 menuIcon.setPrivateMode(isPrivate); |
836 | 839 |
837 shadowPaint.setColor(isPrivate ? shadowPrivateColor : shadowColor); | 840 shadowPaint.setColor(isPrivate ? shadowPrivateColor : shadowColor); |
838 } | 841 } |
839 | 842 |
840 public void show() { | 843 public void show() { |
841 setVisibility(View.VISIBLE); | 844 setVisibility(View.VISIBLE); |
842 } | 845 } |
843 | 846 |
844 public void hide() { | 847 public void hide() { |
845 setVisibility(View.GONE); | 848 setVisibility(View.GONE); |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
942 | 945 |
943 public boolean isBrowserSearchShown() { | 946 public boolean isBrowserSearchShown() { |
944 return isBrowserSearchShown; | 947 return isBrowserSearchShown; |
945 } | 948 } |
946 | 949 |
947 public void setIsBrowserSearchShown(final boolean isShown) { | 950 public void setIsBrowserSearchShown(final boolean isShown) { |
948 isBrowserSearchShown = isShown; | 951 isBrowserSearchShown = isShown; |
949 } | 952 } |
950 } | 953 } |
951 } | 954 } |
OLD | NEW |