Skip to content

Commit ee97c5f

Browse files
committed
SystemUI : improve QS Tile and QS Label options [1/2]
1 parent 9929c57 commit ee97c5f

2 files changed

Lines changed: 25 additions & 4 deletions

File tree

packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileImpl.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,8 +539,10 @@ public static int getColorForState(Context context, int state) {
539539
case Tile.STATE_INACTIVE:
540540
if (setQsUseNewTint == 1) {
541541
return Utils.getColorAttrDefaultColor(context, android.R.attr.textColorPrimary);
542-
} else {
542+
} else if (qsIconPrimary) {
543543
return Utils.getColorAttrDefaultColor(context, android.R.attr.textColorSecondary);
544+
} else {
545+
return Utils.getColorAttrDefaultColor(context, android.R.attr.colorPrimary);
544546
}
545547
case Tile.STATE_ACTIVE:
546548
if (setQsUseNewTint == 1) {

packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileView.java

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import android.view.ViewGroup;
2929
import android.widget.ImageView;
3030
import android.widget.TextView;
31+
import android.graphics.Color;
3132

3233
import com.android.settingslib.Utils;
3334
import com.android.systemui.FontSizeUtils;
@@ -148,15 +149,33 @@ protected void handleStateChanged(QSTile.State state) {
148149
mLabel.setTextColor(mColorLabelActive);
149150
mSecondLine.setTextColor(mColorLabelActive);
150151
mExpandIndicator.setImageTintList(mColorLabelActive);
152+
} else if (setQsLabelUseNewTint == 3) {
153+
mLabel.setTextColor(Color.WHITE);
154+
mSecondLine.setTextColor(Color.WHITE);
155+
mExpandIndicator.setImageTintList(mColorLabelActive);
151156
} else {
152157
mLabel.setTextColor(mColorLabelDefault);
153158
mSecondLine.setTextColor(mColorLabelDefault);
154159
mExpandIndicator.setImageTintList(mColorLabelDefault);
155160
}
156161
} else if (state.state == Tile.STATE_INACTIVE) {
157-
mLabel.setTextColor(mColorLabelDefault);
158-
mSecondLine.setTextColor(mColorLabelDefault);
159-
mExpandIndicator.setImageTintList(mColorLabelDefault);
162+
if (setQsLabelUseNewTint == 1) {
163+
mLabel.setTextColor(mColorLabelActiveRandom);
164+
mSecondLine.setTextColor(mColorLabelActiveRandom);
165+
mExpandIndicator.setImageTintList(mColorLabelDefault);
166+
} else if (setQsLabelUseNewTint == 2) {
167+
mLabel.setTextColor(mColorLabelActive);
168+
mSecondLine.setTextColor(mColorLabelActive);
169+
mExpandIndicator.setImageTintList(mColorLabelActive);
170+
} else if (setQsLabelUseNewTint == 3) {
171+
mLabel.setTextColor(Color.WHITE);
172+
mSecondLine.setTextColor(Color.WHITE);
173+
mExpandIndicator.setImageTintList(mColorLabelActive);
174+
} else {
175+
mLabel.setTextColor(mColorLabelDefault);
176+
mSecondLine.setTextColor(mColorLabelDefault);
177+
mExpandIndicator.setImageTintList(mColorLabelDefault);
178+
}
160179
}
161180
boolean dualTarget = DUAL_TARGET_ALLOWED && state.dualTarget;
162181
mExpandIndicator.setVisibility(View.GONE);

0 commit comments

Comments
 (0)