OLD | NEW |
1 /* This Source Code Form is subject to the terms of the Mozilla Public | 1 /* This Source Code Form is subject to the terms of the Mozilla Public |
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file, | 2 * License, v. 2.0. If a copy of the MPL was not distributed with this file, |
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */ | 3 * You can obtain one at http://mozilla.org/MPL/2.0/. */ |
4 | 4 |
5 package org.mozilla.gecko.toolbar; | 5 package org.mozilla.gecko.toolbar; |
6 | 6 |
7 import org.mozilla.gecko.R; | 7 import org.mozilla.gecko.R; |
8 import org.mozilla.gecko.util.ColorUtils; | 8 import org.mozilla.gecko.util.ColorUtils; |
9 | 9 |
10 import android.content.Context; | 10 import android.content.Context; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 public void onLightweightThemeChanged() { | 63 public void onLightweightThemeChanged() { |
64 final Drawable drawable = BrowserToolbar.getLightweightThemeDrawable(thi
s, getTheme(), R.color.toolbar_grey); | 64 final Drawable drawable = BrowserToolbar.getLightweightThemeDrawable(thi
s, getTheme(), R.color.toolbar_grey); |
65 | 65 |
66 if (drawable == null) { | 66 if (drawable == null) { |
67 return; | 67 return; |
68 } | 68 } |
69 | 69 |
70 final StateListDrawable stateList = new StateListDrawable(); | 70 final StateListDrawable stateList = new StateListDrawable(); |
71 stateList.addState(PRIVATE_PRESSED_STATE_SET, getColorDrawable(R.color.p
laceholder_active_grey)); | 71 stateList.addState(PRIVATE_PRESSED_STATE_SET, getColorDrawable(R.color.p
laceholder_active_grey)); |
72 stateList.addState(PRESSED_ENABLED_STATE_SET, getColorDrawable(R.color.t
oolbar_grey_pressed)); | 72 stateList.addState(PRESSED_ENABLED_STATE_SET, getColorDrawable(R.color.t
oolbar_grey_pressed)); |
73 stateList.addState(PRIVATE_FOCUSED_STATE_SET, getColorDrawable(R.color.t
ext_and_tabs_tray_grey)); | 73 // Using ABB color palette. See https://issues.adblockplus.org/ticket/37
69 |
| 74 stateList.addState(PRIVATE_FOCUSED_STATE_SET, getColorDrawable(R.color.a
bb_background_light_grey)); |
74 stateList.addState(FOCUSED_STATE_SET, getColorDrawable(R.color.tablet_hi
ghlight_focused)); | 75 stateList.addState(FOCUSED_STATE_SET, getColorDrawable(R.color.tablet_hi
ghlight_focused)); |
75 stateList.addState(PRIVATE_STATE_SET, getColorDrawable(R.color.tabs_tray
_grey_pressed)); | 76 stateList.addState(PRIVATE_STATE_SET, getColorDrawable(R.color.tabs_tray
_grey_pressed)); |
76 stateList.addState(EMPTY_STATE_SET, drawable); | 77 stateList.addState(EMPTY_STATE_SET, drawable); |
77 | 78 |
78 setBackgroundDrawable(stateList); | 79 setBackgroundDrawable(stateList); |
79 } | 80 } |
80 | 81 |
81 @Override | 82 @Override |
82 public void onLightweightThemeReset() { | 83 public void onLightweightThemeReset() { |
83 setBackgroundResource(R.drawable.url_bar_nav_button); | 84 setBackgroundResource(R.drawable.url_bar_nav_button); |
84 } | 85 } |
85 } | 86 } |
OLD | NEW |