diff options
Diffstat (limited to 'OpenKeychain/src/main/res/values')
-rw-r--r-- | OpenKeychain/src/main/res/values/arrays.xml | 8 | ||||
-rw-r--r-- | OpenKeychain/src/main/res/values/attrs.xml | 21 | ||||
-rw-r--r-- | OpenKeychain/src/main/res/values/colors.xml | 59 | ||||
-rw-r--r-- | OpenKeychain/src/main/res/values/strings.xml | 4 | ||||
-rw-r--r-- | OpenKeychain/src/main/res/values/styles.xml | 8 | ||||
-rw-r--r-- | OpenKeychain/src/main/res/values/themes.xml | 71 |
6 files changed, 114 insertions, 57 deletions
diff --git a/OpenKeychain/src/main/res/values/arrays.xml b/OpenKeychain/src/main/res/values/arrays.xml index a9f521b17..ef3970672 100644 --- a/OpenKeychain/src/main/res/values/arrays.xml +++ b/OpenKeychain/src/main/res/values/arrays.xml @@ -61,4 +61,12 @@ <item>@string/key_size_custom</item> </string-array> + <string-array name="theme_entries" translatable="false"> + <item>@string/theme_dark</item> + <item>@string/theme_light</item> + </string-array> + <string-array name="theme_values" translatable="false"> + <item>"dark"</item> + <item>"ligh"</item> + </string-array> </resources> diff --git a/OpenKeychain/src/main/res/values/attrs.xml b/OpenKeychain/src/main/res/values/attrs.xml new file mode 100644 index 000000000..5c570e62b --- /dev/null +++ b/OpenKeychain/src/main/res/values/attrs.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <declare-styleable name="CustomTheme"> + <attr name="colorFab" format="color" /> + <attr name="colorFabPressed" format="color" /> + <attr name="colorFabBackground" format="color" /> + <attr name="colorFabText" format="color" /> + <attr name="colorEmphasis" format="color" /> + <attr name="colorHeaderText" format="color" /> + <attr name="colorTertiaryText" format="color" /> + <attr name="colorButtonRow" format="color" /> + <attr name="colorLogBackground" format="color" /> + <attr name="colorCardViewHeaderDivider" format="color" /> + <attr name="colorText" format="color" /> + <attr name="colorBrightToolbar" format="color" /> + <attr name="colorCardViewBackground" format="color" /> + <attr name="colorTabText" format="color" /> + <attr name="colorTabTextSelected" format="color" /> + <attr name="colorTabIndicator" format="color" /> + </declare-styleable> +</resources> diff --git a/OpenKeychain/src/main/res/values/colors.xml b/OpenKeychain/src/main/res/values/colors.xml index ead006a63..5db66b945 100644 --- a/OpenKeychain/src/main/res/values/colors.xml +++ b/OpenKeychain/src/main/res/values/colors.xml @@ -1,54 +1,22 @@ <?xml version="1.0" encoding="utf-8"?> <resources> - <!-- Main theme colors --> - - <!-- green colors from OpenKeychain logo bottom right --> - <!-- your app branding color for the app bar --> <color name="primary">#7bad45</color> - <!-- darker variant for the status bar and contextual app bars --> - <color name="primary_dark">#6c983d</color> - <!-- theme UI controls like checkboxes and text fields --> - <color name="accent">#2196F3</color> - - <!-- Other colors --> - - <color name="black">#000000</color> - - <color name="primary_light">#C8E6C9</color> - <color name="fab">@color/accent</color> - <color name="fab_pressed">#1976D2</color> - <color name="primary_text">#212121</color> - <color name="secondary_text">#727272</color> - <color name="icons">#FFFFFF</color> - <color name="divider">#B6B6B6</color> - <color name="transparent">#00FFFFFF</color> - - <color name="header_text">#212121</color> - <!-- item selection, search highlight --> - <color name="emphasis">@color/accent</color> - - <color name="bg_gray">#cecbce</color> - <color name="tertiary_text_light">#808080</color> - <color name="alert">#ffdd3333</color> - - <color name="holo_gray_light">#33999999</color> - <color name="holo_gray_bright">#33CCCCCC</color> - <!-- tabs --> - <color name="tab_text">#70FFFFFF</color> - <color name="tab_text_selected">#FFFFFF</color> - <color name="tab_indicator">#FFFFFF</color> + <color name="icons">#ffffff</color> + <color name="transparent">#00ffffff</color> + <color name="key_flag_gray">#808080</color> + <color name="key_flag_red">#f44336</color> + <color name="key_flag_orange">#ff9800</color> + <color name="key_flag_green">#7bad45</color> - <!-- floating action buttons --> - <color name="black_semi_transparent">#B2000000</color> - <color name="background">#e5e5e5</color> - <color name="half_black">#808080</color> - <color name="white">#fafafa</color> - <color name="white_pressed">#f1f1f1</color> + <color name="password_strength_low">#f44336</color> + <color name="password_strength_medium">#ff9800</color> + <color name="password_strength_high">#7bad45</color> <!-- + Standard Android colors: http://www.google.com/design/spec/style/color.html#color-color-palette light = normal color dark = 900 @@ -58,10 +26,7 @@ <color name="android_red_light">#f44336</color> <color name="android_red_dark">#b71c1c</color> <color name="android_orange_light">#ff9800</color> - <color name="android_orange_dark">#e65100</color> - <color name="android_green_light">@color/primary</color> - <color name="android_green_dark">@color/primary_dark</color> - <color name="android_purple_light">#673ab7</color> - <color name="android_purple_dark">#311b92</color> + <color name="android_green_light">#7bad45</color> + <color name="android_green_dark">#6c983d</color> </resources> diff --git a/OpenKeychain/src/main/res/values/strings.xml b/OpenKeychain/src/main/res/values/strings.xml index db81963c1..faa9aa39c 100644 --- a/OpenKeychain/src/main/res/values/strings.xml +++ b/OpenKeychain/src/main/res/values/strings.xml @@ -50,6 +50,7 @@ <string name="section_cloud_search">"Cloud search"</string> <string name="section_passphrase_cache">"Password/PIN Handling"</string> <string name="section_proxy_settings">"Proxy Settings"</string> + <string name="section_gui">"Interface"</string> <string name="section_certify">"Confirm"</string> <string name="section_actions">"Actions"</string> <string name="section_share_key">"Key"</string> @@ -167,6 +168,7 @@ <string name="label_verify_keyserver">"Verify keyserver"</string> <string name="label_enter_keyserver_url">"Enter keyserver URL"</string> <string name="label_keyserver_dialog_delete">"Delete keyserver"</string> + <string name="label_theme">"Theme"</string> <string name="pref_keyserver">"OpenPGP keyservers"</string> <string name="pref_keyserver_summary">"Search keys on selected OpenPGP keyservers (HKP protocol)"</string> @@ -245,6 +247,8 @@ <string name="filemanager_title_open">"Open…"</string> <string name="error">"Error"</string> <string name="error_message">"Error: %s"</string> + <string name="theme_dark">"Dark"</string> + <string name="theme_light">"Light"</string> <!-- key flags --> <string name="flag_certify">"Certify"</string> diff --git a/OpenKeychain/src/main/res/values/styles.xml b/OpenKeychain/src/main/res/values/styles.xml index c7b326b7a..73a594ac4 100644 --- a/OpenKeychain/src/main/res/values/styles.xml +++ b/OpenKeychain/src/main/res/values/styles.xml @@ -7,7 +7,7 @@ <item name="android:layout_marginTop">16dp</item> <item name="android:paddingLeft">16dp</item> <item name="android:textStyle">normal</item> - <item name="android:textColor">@color/header_text</item> + <item name="android:textColor">?attr/colorHeaderText</item> <item name="android:textSize">17sp</item> </style> @@ -17,13 +17,13 @@ <item name="android:layout_marginTop">8dp</item> <item name="android:paddingLeft">8dp</item> <item name="android:textStyle">bold</item> - <item name="android:textColor">@color/header_text</item> + <item name="android:textColor">?attr/colorHeaderText</item> <item name="android:textSize">14sp</item> </style> <style name="FabMenuStyle"> <item name="android:background">@drawable/fab_label_background</item> - <item name="android:textColor">@color/white</item> + <item name="android:textColor">?attr/colorFabText</item> </style> <!-- This style is for use with our drag and drop RecyclerView since ItemDecoration did not @@ -34,4 +34,4 @@ <item name="android:background">?android:attr/listDivider</item> </style> -</resources>
\ No newline at end of file +</resources> diff --git a/OpenKeychain/src/main/res/values/themes.xml b/OpenKeychain/src/main/res/values/themes.xml index 8e0ea6ac0..3bdbf811d 100644 --- a/OpenKeychain/src/main/res/values/themes.xml +++ b/OpenKeychain/src/main/res/values/themes.xml @@ -1,12 +1,30 @@ <?xml version="1.0" encoding="utf-8"?> <resources> - <style name="KeychainTheme" parent="KeychainTheme.Base" /> + <style name="LightBaseTheme" parent="Theme.AppCompat.Light"> + <item name="colorPrimary">#7bad45</item> + <item name="colorPrimaryDark">#6c983d</item> + <item name="colorAccent">#2196f3</item> + <item name="colorBrightToolbar">#dddddd</item> - <style name="KeychainTheme.Base" parent="Theme.AppCompat.Light"> - <item name="colorPrimary">@color/primary</item> - <item name="colorPrimaryDark">@color/primary_dark</item> - <item name="colorAccent">@color/accent</item> + <item name="colorFab">#2196f3</item> + <item name="colorFabPressed">#1976d2</item> + <item name="colorFabBackground">#b2000000</item> + <item name="colorFabText">#fafafa</item> + + <item name="colorTabText">#70ffffff</item> + <item name="colorTabTextSelected">#ffffff</item> + <item name="colorTabIndicator">#ffffff</item> + + <item name="colorEmphasis">#2196f3</item> + <item name="colorButtonRow">#33cccccc</item> + <item name="colorLogBackground">#cecbce</item> + <item name="colorCardViewHeaderDivider">#808080</item> + <item name="colorCardViewBackground">#ffffff</item> + + <item name="colorText">#000000</item> + <item name="colorHeaderText">#212121</item> + <item name="colorTertiaryText">#808080</item> <!-- remove actionbar and title, we use toolbar! --> <item name="windowNoTitle">true</item> @@ -16,6 +34,47 @@ <item name="searchViewStyle">@style/MySearchViewStyle</item> </style> + <style name="DarkBaseTheme" parent="MaterialDrawerTheme.ActionBar"> + <item name="colorPrimary">#268bd2</item> + <item name="colorPrimaryDark">#166bb2</item> + <item name="colorAccent">#2196f3</item> + <item name="colorBrightToolbar">#808080</item> + + <item name="colorFab">#2196f3</item> + <item name="colorFabPressed">#1976d2</item> + <item name="colorFabBackground">#b2000000</item> + <item name="colorFabText">#fafafa</item> + + <item name="colorTabText">#70ffffff</item> + <item name="colorTabTextSelected">#ffffff</item> + <item name="colorTabIndicator">#ffffff</item> + + <item name="colorEmphasis">#2196f3</item> + <item name="colorButtonRow">#33cccccc</item> + <item name="colorLogBackground">#303030</item> + <item name="colorCardViewHeaderDivider">#808080</item> + <item name="colorCardViewBackground">#505050</item> + + <item name="colorText">#ffffff</item> + <item name="colorHeaderText">#d0d0d0</item> + <item name="colorTertiaryText">#808080</item> + + <item name="material_drawer_selected_text">#268bd2</item> + + <!-- remove actionbar and title, we use toolbar! --> + <item name="windowNoTitle">true</item> + <item name="windowActionBar">false</item> + <!-- multi selection should overlay Toolbar! http://stackoverflow.com/a/26450875 --> + <item name="windowActionModeOverlay">true</item> + <item name="searchViewStyle">@style/MySearchViewStyle</item> + </style> + + <style name="LightTheme" parent="LightBaseTheme"> + </style> + + <style name="DarkTheme" parent="DarkBaseTheme"> + </style> + <!-- http://android-developers.blogspot.de/2014/10/appcompat-v21-material-design-for-pre.html --> <style name="MySearchViewStyle" parent="Widget.AppCompat.SearchView"> <!-- Background for the search query section (e.g. EditText) --> @@ -40,4 +99,4 @@ <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> </style> -</resources>
\ No newline at end of file +</resources> |