Skip to content

Commit

Permalink
add system theme (prefer black) option
Browse files Browse the repository at this point in the history
  • Loading branch information
jamie-mh committed Sep 11, 2023
1 parent edf6f82 commit 1b4d419
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions AuthenticatorPro.Droid/Resources/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,14 @@

<string-array name="themeNames">
<item>@string/systemDefault</item>
<item>@string/systemDefaultBlack</item>
<item>@string/lightTheme</item>
<item>@string/darkTheme</item>
<item>@string/blackTheme</item>
</string-array>
<string-array name="themeValues">
<item>system</item>
<item>system-black</item>
<item>light</item>
<item>dark</item>
<item>black</item>
Expand Down
1 change: 1 addition & 0 deletions AuthenticatorPro.Droid/Resources/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@
<string name="timeout10Min">10 minutes</string>

<string name="systemDefault">System default</string>
<string name="systemDefaultBlack">System default (black)</string>
<string name="lightTheme">Light theme</string>
<string name="darkTheme">Dark theme</string>
<string name="blackTheme">Black theme</string>
Expand Down
2 changes: 1 addition & 1 deletion AuthenticatorPro.Droid/src/Activity/BaseActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ private void UpdateOverlay()
Theme.ApplyStyle(overlay, true);
}

if (Preferences.Theme == "black")
if (Preferences.Theme == "black" || Preferences.Theme == "system-black" && IsDark)
{
Theme.ApplyStyle(Resource.Style.OverlayBlack, true);
}
Expand Down

0 comments on commit 1b4d419

Please sign in to comment.