Skip to content

Commit

Permalink
Added blank theme
Browse files Browse the repository at this point in the history
  • Loading branch information
M66B committed Jul 12, 2024
1 parent 52020aa commit 3cd927f
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 5 deletions.
11 changes: 10 additions & 1 deletion app/src/main/java/eu/faircode/email/FragmentDialogTheme.java
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,10 @@ else if (dark || black)
rgTheme.check(R.id.rbThemeSolarized);
break;

case "blank":
rgTheme.check(R.id.rbThemeBlank);
break;

case "black":
case "white":
case "bw_system":
Expand Down Expand Up @@ -346,7 +350,9 @@ public void onClick(DialogInterface dialog, int which) {
else
editor.putString("theme",
"solarized" + (dark ? "_dark" : "_light")).apply();
} else if (checkedRadioButtonId == R.id.rbThemeBlackOrWhite) {
} else if (checkedRadioButtonId == R.id.rbThemeBlank)
editor.putString("theme", "blank").apply();
else if (checkedRadioButtonId == R.id.rbThemeBlackOrWhite) {
if (system)
editor.putString("theme", "bw_system").apply();
else
Expand Down Expand Up @@ -499,6 +505,9 @@ static int getTheme(Context context) {
return R.style.AppThemeSolarizedDark;

// Black
case "blank":
return R.style.AppThemeBlank;

case "black":
if (light)
return R.style.AppThemeGreySteelBlueLight;
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/selected_count_background.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="?attr/colorPrimary" />
<solid android:color="?attr/colorInfoBackground" />
<corners android:radius="6dp" />
</shape>
8 changes: 8 additions & 0 deletions app/src/main/res/layout-v31/dialog_theme.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@
android:text="@string/title_setup_theme_solarized"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />

<RadioButton
android:id="@+id/rbThemeBlank"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="6dp"
android:text="@string/title_setup_theme_white"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />

<RadioButton
android:id="@+id/rbThemeBlackOrWhite"
android:layout_width="match_parent"
Expand Down
8 changes: 8 additions & 0 deletions app/src/main/res/layout-v34/dialog_theme.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@
android:text="@string/title_setup_theme_solarized"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />

<RadioButton
android:id="@+id/rbThemeBlank"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="6dp"
android:text="@string/title_setup_theme_white"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />

<RadioButton
android:id="@+id/rbThemeBlackOrWhite"
android:layout_width="match_parent"
Expand Down
8 changes: 8 additions & 0 deletions app/src/main/res/layout/dialog_theme.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@
android:text="@string/title_setup_theme_solarized"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />

<RadioButton
android:id="@+id/rbThemeBlank"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="6dp"
android:text="@string/title_setup_theme_white"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />

<RadioButton
android:id="@+id/rbThemeBlackOrWhite"
android:layout_width="match_parent"
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@

<color name="white">#ffffffff</color>
<color name="black">#ff000000</color>
<color name="smoke">#fff5f5f5</color>
<color name="grey">#ff7f7f7f</color>
<color name="red">#ffff0000</color>
<color name="transparent">#00000000</color>
Expand Down
17 changes: 14 additions & 3 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,17 @@
<item name="snackbarStyle">@style/WhiteSnackBar</item>
</style>

<style name="AppThemeBlank" parent="AppThemeBlueOrangeLight">
<item name="colorPrimary">@color/white</item>
<item name="colorPrimaryDark">@color/white</item>
<item name="colorAccent">@color/blackAccent</item>

<item name="colorInfoForeground">@color/blackPrimary</item>
<item name="colorInfoBackground">@color/smoke</item>

<item name="snackbarStyle">@style/WhiteSnackBar</item>
</style>

<style name="WhiteSnackBar" parent="Widget.Design.Snackbar">
<item name="android:paddingLeft">0dp</item>
<item name="android:paddingRight">0dp</item>
Expand Down Expand Up @@ -466,7 +477,7 @@
<item name="colorFabBackground">@color/blackAndWhitePrimaryLight</item>

<item name="colorInfoForeground">@color/white</item>
<item name="colorInfoBackground">@color/blackPrimary</item>
<item name="colorInfoBackground">@color/blackAndWhitePrimary</item>

<item name="android:windowBackground">@drawable/background_black</item>
<item name="colorDrawerBackground">@color/black</item>
Expand Down Expand Up @@ -523,7 +534,7 @@
<item name="colorFabBackground">@color/darkSolarizedAccent</item>

<item name="colorInfoForeground">@color/white</item>
<item name="colorInfoBackground">@color/darkSolarizedAccent</item>
<item name="colorInfoBackground">@color/darkSolarizedPrimary</item>

<item name="android:textColorLink">@color/darkSolarizedAccent</item>
<item name="android:textColorLinkInverse">@color/darkSolarizedAccent</item>
Expand All @@ -547,7 +558,7 @@
<item name="colorFabBackground">@color/darkSolarizedAccent</item>

<item name="colorInfoForeground">@color/white</item>
<item name="colorInfoBackground">@color/darkSolarizedAccent</item>
<item name="colorInfoBackground">@color/darkSolarizedPrimary</item>

<item name="android:textColorLink">@color/darkSolarizedAccent</item>
<item name="android:textColorLinkInverse">@color/darkSolarizedAccent</item>
Expand Down

0 comments on commit 3cd927f

Please sign in to comment.