Added option for wide color stripe

This commit is contained in:
M66B
2021-11-30 11:27:50 +01:00
parent 787599a3f8
commit a1934c48b7
12 changed files with 64 additions and 4 deletions

View File

@@ -100,6 +100,7 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
private int dp12;
private float textSize;
private int colorStripeWidth;
private int textColorPrimary;
private int textColorSecondary;
private int colorUnread;
@@ -185,6 +186,8 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
grpFlagged = itemView.findViewById(R.id.grpFlagged);
grpExtended = itemView.findViewById(R.id.grpExtended);
vwColor.getLayoutParams().width = colorStripeWidth;
}
private void wire() {
@@ -1164,6 +1167,8 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
this.dp12 = Helper.dp2pixels(context, 12);
this.textSize = Helper.getTextSize(context, zoom);
boolean color_stripe_wide = prefs.getBoolean("color_stripe_wide", false);
this.colorStripeWidth = Helper.dp2pixels(context, color_stripe_wide ? 12 : 6);
this.textColorPrimary = Helper.resolveColor(context, android.R.attr.textColorPrimary);
this.textColorSecondary = Helper.resolveColor(context, android.R.attr.textColorSecondary);