Implement Dark Theme (DayNight with automatic option)

This is just a first rough implementation.
A real UI designer should look over this.
This commit is contained in:
Torsten Grote
2018-05-24 11:52:13 -03:00
parent dcacae0729
commit 3c6b43b2bd
116 changed files with 619 additions and 328 deletions

View File

@@ -51,4 +51,20 @@
<item>tr</item>
<item>zh-CN</item>
</string-array>
<string-array name="pref_theme_entries">
<item>@string/pref_theme_light</item>
<item>@string/pref_theme_dark</item>
<item>@string/pref_theme_auto</item>
<item>@string/pref_theme_system</item>
</string-array>
<string name="pref_theme_light_value">light</string>
<string name="pref_theme_dark_value">dark</string>
<string name="pref_theme_auto_value">auto</string>
<string name="pref_theme_system_value">system</string>
<string-array name="pref_theme_values">
<item>@string/pref_theme_light_value</item>
<item>@string/pref_theme_dark_value</item>
<item>@string/pref_theme_auto_value</item>
<item>@string/pref_theme_system_value</item>
</string-array>
</resources>

View File

@@ -7,7 +7,7 @@
<color name="briar_green_light">#95D220</color>
<color name="briar_link">#06B9FF</color>
<color name="window_background">#eceff1</color>
<color name="window_background">#fffafafa</color>
<color name="action_bar_text">#FFFFFF</color>
<color name="button_bar_background">#FFFFFF</color>
<color name="private_message_date">#AAAAAA</color>
@@ -20,6 +20,10 @@
<color name="briar_accent">@color/briar_blue</color>
<color name="control_normal_light">#757575</color>
<color name="color_primary">#dd000000</color>
<color name="color_primary_inverse">#ffffff</color>
<color name="color_secondary">#89000000</color>
<!-- text colors -->
<color name="briar_text_link">@color/briar_link</color>
<color name="briar_text_primary">#df000000</color>
@@ -40,5 +44,5 @@
<color name="menu_background">#FFFFFF</color>
<color name="spinner_border">#61000000</color> <!-- 38% Black -->
<color name="forum_cell_highlight">#ffffff</color>
<color name="thread_item_highlight">#729ecc</color>
</resources>

View File

@@ -329,6 +329,11 @@
<string name="pref_language_changed">This setting will take effect when you restart Briar. Please sign out and restart Briar.</string>
<string name="pref_language_default">System default</string>
<string name="display_settings_title">Display</string>
<string name="pref_theme_title">Theme</string>
<string name="pref_theme_light">Light</string>
<string name="pref_theme_dark">Dark</string>
<string name="pref_theme_auto">Automatic (Daytime)</string>
<string name="pref_theme_system">System Default</string>
<!-- Settings Network -->
<string name="network_settings_title">Networks</string>

View File

@@ -32,6 +32,7 @@
<item name="android:layout_height">wrap_content</item>
<item name="android:textSize">@dimen/text_size_medium</item>
<item name="android:padding">@dimen/margin_large</item>
<item name="android:textColor">@color/briar_text_primary_inverse</item>
</style>
<style name="BriarButtonFlat.Negative" parent="Widget.AppCompat.Button.Borderless">
@@ -50,20 +51,6 @@
<item name="android:minWidth">@dimen/button_size</item>
</style>
<style name="BriarTextTitle">
<item name="android:textSize">@dimen/text_size_medium</item>
<item name="android:textColor">@android:color/primary_text_light</item>
</style>
<style name="BriarTextTitleInverted" parent="BriarTextTitle">
<item name="android:textColor">@android:color/primary_text_dark</item>
</style>
<style name="BriarTextBody">
<item name="android:textSize">@dimen/text_size_small</item>
<item name="android:textColor">@android:color/primary_text_light</item>
</style>
<style name="Divider">
<item name="android:background">@color/divider</item>
</style>
@@ -86,7 +73,7 @@
<style name="BriarAvatar">
<item name="civ_border_width">@dimen/avatar_border_width</item>
<item name="civ_border_color">@color/briar_primary</item>
<item name="civ_border_color">?android:attr/textColorPrimary</item>
</style>
<style name="NavMenuButton" parent="Widget.AppCompat.Button.Borderless.Colored">

View File

@@ -1,13 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="BriarTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<style name="BriarTheme" parent="Theme.AppCompat.DayNight.DarkActionBar">
<item name="colorPrimary">@color/briar_primary</item>
<item name="colorPrimaryDark">@color/briar_primary_dark</item>
<item name="colorAccent">@color/briar_accent</item>
<item name="colorControlNormal">@color/control_normal_light</item>
<item name="android:textColorLink">@color/briar_text_link</item>
<item name="android:windowBackground">@color/window_background</item>
<item name="android:windowAnimationStyle">@style/ActivityAnimation</item>
<item name="preferenceTheme">@style/PreferenceThemeOverlay.v14.Material</item>
</style>
@@ -25,7 +23,7 @@
<item name="android:activityCloseExitAnimation">@anim/screen_new_out</item>
</style>
<style name="BriarDialogTheme" parent="Theme.AppCompat.Light.Dialog">
<style name="BriarDialogTheme" parent="Theme.AppCompat.DayNight.Dialog">
<item name="colorPrimary">@color/briar_primary</item>
<item name="colorPrimaryDark">@color/briar_primary_dark</item>
<item name="colorAccent">@color/briar_accent</item>