Using You background color

This commit is contained in:
M66B
2023-10-17 11:26:56 +02:00
parent 59bcce556c
commit 1f8aa6ce93
2 changed files with 480 additions and 8 deletions

View File

@@ -627,16 +627,23 @@ public class FragmentDialogTheme extends FragmentDialogBase {
String theme = prefs.getString("theme", "blue_orange_system");
boolean dark = Helper.isDarkTheme(context);
boolean solarized = (theme != null && theme.startsWith("solarized"));
boolean you = (theme != null && theme.startsWith("you_"));
if (cards) {
if (compose) {
if (!dark || solarized)
view.setBackgroundColor(Helper.resolveColor(context, R.attr.colorCardBackground));
} else {
if (!dark && !solarized)
view.setBackgroundColor(ContextCompat.getColor(context, beige
? R.color.lightColorBackground_cards_beige
: R.color.lightColorBackground_cards));
if (you && Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
view.setBackgroundColor(ContextCompat.getColor(context, dark
? android.R.color.system_background_dark
: android.R.color.system_background_light));
else {
if (compose) {
if (!dark || solarized)
view.setBackgroundColor(Helper.resolveColor(context, R.attr.colorCardBackground));
} else {
if (!dark && !solarized)
view.setBackgroundColor(ContextCompat.getColor(context, beige
? R.color.lightColorBackground_cards_beige
: R.color.lightColorBackground_cards));
}
}
} else {
if (tabular_card_bg)