Use accent color for activated quick filter icons

This commit is contained in:
M66B 2023-10-29 07:06:52 +01:00
parent da11ce476d
commit 4e639b3da3
1 changed files with 6 additions and 0 deletions

View File

@ -355,6 +355,7 @@ public class FragmentMessages extends FragmentBase
private int colorPrimary;
private int colorAccent;
private int colorControlNormal;
private int colorSeparator;
private int colorWarning;
@ -509,6 +510,7 @@ public class FragmentMessages extends FragmentBase
colorPrimary = Helper.resolveColor(getContext(), androidx.appcompat.R.attr.colorPrimary);
colorAccent = Helper.resolveColor(getContext(), androidx.appcompat.R.attr.colorAccent);
colorControlNormal = Helper.resolveColor(getContext(), android.R.attr.colorControlNormal);
colorSeparator = Helper.resolveColor(getContext(), R.attr.colorSeparator);
colorWarning = Helper.resolveColor(getContext(), R.attr.colorWarning);
@ -5901,6 +5903,10 @@ public class FragmentMessages extends FragmentBase
ibUnflagged.setImageResource(filter_unflagged ? R.drawable.twotone_star_border_24 : R.drawable.baseline_star_24);
ibSnoozed.setImageResource(filter_snoozed ? R.drawable.twotone_visibility_off_24 : R.drawable.twotone_visibility_24);
ibSeen.setImageTintList(ColorStateList.valueOf(filter_seen ? colorAccent : colorControlNormal));
ibUnflagged.setImageTintList(ColorStateList.valueOf(filter_unflagged ? colorAccent : colorControlNormal));
ibSnoozed.setImageTintList(ColorStateList.valueOf(filter_snoozed ? colorControlNormal : colorAccent));
ibSeen.setVisibility(quick_filter && folder ? View.VISIBLE : View.GONE);
ibUnflagged.setVisibility(quick_filter && folder ? View.VISIBLE : View.GONE);
ibSnoozed.setVisibility(quick_filter && folder && !drafts ? View.VISIBLE : View.GONE);