mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-03 05:34:51 +00:00
Allow beige background for Material You
This commit is contained in:
parent
e1295323ae
commit
79b01e8eb9
2 changed files with 16 additions and 5 deletions
|
@ -1063,6 +1063,14 @@ public class ApplicationEx extends Application
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (version < 2243 && "a".equals(BuildConfig.REVISION)) {
|
||||||
|
boolean beige = prefs.getBoolean("beige", true);
|
||||||
|
String theme = prefs.getString("theme", "blue_orange_system");
|
||||||
|
boolean you = theme.startsWith("you_");
|
||||||
|
if (you && beige)
|
||||||
|
editor.putBoolean("beige", false);
|
||||||
|
}
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && !BuildConfig.DEBUG)
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && !BuildConfig.DEBUG)
|
||||||
editor.remove("background_service");
|
editor.remove("background_service");
|
||||||
|
|
||||||
|
|
|
@ -663,11 +663,14 @@ public class FragmentDialogTheme extends FragmentDialogBase {
|
||||||
|
|
||||||
Integer color = null;
|
Integer color = null;
|
||||||
if (cards) {
|
if (cards) {
|
||||||
if (you && (!dark || !black) && Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
|
if (you && (!dark || !black) && Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
|
||||||
|
if (beige)
|
||||||
|
color = ContextCompat.getColor(context, R.color.lightColorBackground_cards_beige);
|
||||||
|
else
|
||||||
color = ContextCompat.getColor(context, dark
|
color = ContextCompat.getColor(context, dark
|
||||||
? android.R.color.system_background_dark
|
? android.R.color.system_background_dark
|
||||||
: android.R.color.system_background_light);
|
: android.R.color.system_background_light);
|
||||||
else {
|
} else {
|
||||||
if (compose) {
|
if (compose) {
|
||||||
if (!dark || solarized)
|
if (!dark || solarized)
|
||||||
color = Helper.resolveColor(context, R.attr.colorCardBackground);
|
color = Helper.resolveColor(context, R.attr.colorCardBackground);
|
||||||
|
|
Loading…
Reference in a new issue