From 62b0491473c7f26cd3dbdc326a70c9f976b8bec4 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 20 Dec 2022 08:40:26 +0100 Subject: [PATCH] Added option to disable unread shadow border --- .../java/eu/faircode/email/AdapterMessage.java | 15 +++++++++++---- .../java/eu/faircode/email/FragmentOptions.java | 2 +- .../eu/faircode/email/FragmentOptionsDisplay.java | 15 ++++++++++++++- .../main/res/layout/fragment_options_display.xml | 15 ++++++++++++++- app/src/main/res/values/strings.xml | 1 + 5 files changed, 41 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/AdapterMessage.java b/app/src/main/java/eu/faircode/email/AdapterMessage.java index 3d632d9511..f4080c63fb 100644 --- a/app/src/main/java/eu/faircode/email/AdapterMessage.java +++ b/app/src/main/java/eu/faircode/email/AdapterMessage.java @@ -263,6 +263,7 @@ public class AdapterMessage extends RecyclerView.Adapter 0); int color = (shadow ? ColorUtils.setAlphaComponent(shadow_highlight ? colorUnreadHighlight : colorAccent, 127) @@ -1901,9 +1902,14 @@ public class AdapterMessage extends RecyclerView.Adapter 0) - color = ColorUtils.setAlphaComponent(colorCardBackground, 192); - else if (split) + if (cards && shadow_unread && message.unseen > 0) { + if (shadow_border) + color = ColorUtils.setAlphaComponent(colorCardBackground, 192); + else { + int fg = (shadow_highlight ? colorUnreadHighlight : colorAccent); + color = ColorUtils.blendARGB(colorCardBackground, fg, 0.125f); + } + } else if (split) color = ColorUtils.setAlphaComponent(textColorHighlightInverse, 127); else if (flags_background && flagged && !expanded) color = ColorUtils.setAlphaComponent(mcolor, 127); @@ -7325,6 +7331,7 @@ public class AdapterMessage extends RecyclerView.Adapter + + Use beige background when using card style (light themes only) Use card color as background color when using tabular style Use shadow for unread messages when using card style + Show border Use highlight color instead of accent color Use divider lines when using tabular style Group by date