From c318d60916e13e3e68fc6cf9a18b78175cafa8e7 Mon Sep 17 00:00:00 2001 From: Anjani Kumar Date: Mon, 11 May 2020 23:07:25 +0000 Subject: [PATCH] New way to support dark theme to improve integration with system --- .../state_list_drawer_background.xml | 5 ++ res/values-night/colors-night.xml | 17 ++++++ res/values-v21/styles-dark.xml | 13 ----- res/values-v28/strings.xml | 8 +++ res/values/colors.xml | 12 ++++ res/values/strings.xml | 13 +++++ res/values/styles-dark.xml | 43 -------------- res/values/styles.xml | 19 +++--- .../BigscreenPlugin/BigscreenActivity.java | 1 - .../FindMyPhoneActivity.java | 1 - .../MousePadPlugin/MousePadActivity.java | 1 - .../Plugins/MprisPlugin/MprisActivity.java | 1 - .../NotificationFilterActivity.java | 2 - .../PresenterPlugin/PresenterActivity.java | 2 - .../RunCommandPlugin/RunCommandActivity.java | 2 - .../Plugins/SharePlugin/SendFileActivity.java | 2 - .../Plugins/SharePlugin/ShareActivity.java | 2 - .../AppCompatPreferenceActivity.java | 1 - .../UserInterface/CustomDevicesActivity.java | 1 - .../UserInterface/MainActivity.java | 2 - .../UserInterface/PluginSettingsActivity.java | 1 - .../UserInterface/SettingsFragment.java | 41 ++++++------- .../kdeconnect/UserInterface/ThemeUtil.java | 58 ++++++++----------- .../TrustedNetworksActivity.java | 1 - 24 files changed, 105 insertions(+), 144 deletions(-) create mode 100644 res/drawable-night/state_list_drawer_background.xml create mode 100644 res/values-night/colors-night.xml delete mode 100644 res/values-v21/styles-dark.xml create mode 100644 res/values-v28/strings.xml create mode 100644 res/values/colors.xml delete mode 100644 res/values/styles-dark.xml diff --git a/res/drawable-night/state_list_drawer_background.xml b/res/drawable-night/state_list_drawer_background.xml new file mode 100644 index 00000000..cbfe301e --- /dev/null +++ b/res/drawable-night/state_list_drawer_background.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/res/values-night/colors-night.xml b/res/values-night/colors-night.xml new file mode 100644 index 00000000..4d0bcb75 --- /dev/null +++ b/res/values-night/colors-night.xml @@ -0,0 +1,17 @@ + + + #333333 + #555555 + #222222 + #333333 + @android:color/black + @android:color/white + @android:color/white + @android:color/white + #222222 + + + @android:color/white + \ No newline at end of file diff --git a/res/values-v21/styles-dark.xml b/res/values-v21/styles-dark.xml deleted file mode 100644 index 1c90b474..00000000 --- a/res/values-v21/styles-dark.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/res/values-v28/strings.xml b/res/values-v28/strings.xml new file mode 100644 index 00000000..f53bcd2e --- /dev/null +++ b/res/values-v28/strings.xml @@ -0,0 +1,8 @@ + + + + System Default + Light + Dark + + \ No newline at end of file diff --git a/res/values/colors.xml b/res/values/colors.xml new file mode 100644 index 00000000..da5392be --- /dev/null +++ b/res/values/colors.xml @@ -0,0 +1,12 @@ + + + #F67400 + #BD5900 + #4ebffa + #EEEEEE + @android:color/white + @android:color/black + @android:color/black + @android:color/black + #F67400 + \ No newline at end of file diff --git a/res/values/strings.xml b/res/values/strings.xml index 9fcb1311..59f67a8c 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -368,4 +368,17 @@ Down Bigscreen remote Use your device as a remote for Plasma Bigscreen + + Choose theme + + Set by Battery Saver + Light + Dark + + + + default + light + dark + diff --git a/res/values/styles-dark.xml b/res/values/styles-dark.xml deleted file mode 100644 index 2da687be..00000000 --- a/res/values/styles-dark.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - #555555 - #222222 - #333333 - - - - - - - - - - - \ No newline at end of file diff --git a/res/values/styles.xml b/res/values/styles.xml index b5585697..c6de319b 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -1,24 +1,19 @@ - #F67400 - #BD5900 - #4ebffa - #EEEEEE - - @@ -31,7 +26,7 @@