Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: mobile/android/base/java/org/mozilla/gecko/tabs/TabStrip.java

Issue 29986555: Issue 7200 - Adjust UI colors (Closed)
Patch Set: Created Jan. 21, 2019, 6:56 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
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 file, 3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4 * You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 5
6 package org.mozilla.gecko.tabs; 6 package org.mozilla.gecko.tabs;
7 7
8 import android.content.Context; 8 import android.content.Context;
9 import android.graphics.drawable.Drawable; 9 import android.graphics.drawable.Drawable;
10 import android.graphics.drawable.StateListDrawable; 10 import android.graphics.drawable.StateListDrawable;
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 } 178 }
179 179
180 @Override 180 @Override
181 public void onLightweightThemeChanged() { 181 public void onLightweightThemeChanged() {
182 final Drawable drawable = getTheme().getDrawable(this); 182 final Drawable drawable = getTheme().getDrawable(this);
183 if (drawable == null) { 183 if (drawable == null) {
184 return; 184 return;
185 } 185 }
186 186
187 final StateListDrawable stateList = new StateListDrawable(); 187 final StateListDrawable stateList = new StateListDrawable();
188 // Using ABB color palette. See https://issues.adblockplus.org/ticket/37 69 188 stateList.addState(PRIVATE_STATE_SET, getColorDrawable(R.color.text_and_ tabs_tray_grey));
189 stateList.addState(PRIVATE_STATE_SET, getColorDrawable(R.color.abb_backg round_light_grey));
190 stateList.addState(EMPTY_STATE_SET, drawable); 189 stateList.addState(EMPTY_STATE_SET, drawable);
191 190
192 setBackgroundDrawable(stateList); 191 setBackgroundDrawable(stateList);
193 } 192 }
194 193
195 @Override 194 @Override
196 public void onLightweightThemeReset() { 195 public void onLightweightThemeReset() {
197 // Using ABB color palette. See https://issues.adblockplus.org/ticket/37 69 196 final int defaultBackgroundColor = ContextCompat.getColor(getContext(), R.color.text_and_tabs_tray_grey);
198 final int defaultBackgroundColor = ContextCompat.getColor(getContext(), R.color.abb_background_light_grey);
199 setBackgroundColor(defaultBackgroundColor); 197 setBackgroundColor(defaultBackgroundColor);
200 } 198 }
201 } 199 }
OLDNEW

Powered by Google App Engine
This is Rietveld