Theming improvements (#502)

* Split theme definitions into day and night

* Add support for Night Mode in code

* Add theme chooser in preferences

* Fix translations

* Adjust IDs

* Adjust preferences for custom themes

* UI tweaks for custom theme support

* Added code for custom theme support 🍅

* Fixed resource display in Kotlin 🍅

* Restored styles

* Updated strings

* Fixed getIdentifier() to fit into setTheme()

* Removed redundant resources

* Reset default theme to "Dusky"

* Fixed night mode handler to maintain compatibility

* Refactor functions to use helper methods

* Added license block

* Added preview to theme selector

* Added color identifier getter helper method

* Fixed reference in AccountMediaFragment

* Cleanup

* Fixed navbar foreground not changing color

* Fix fallback theme switch(){}

* Enable location-based daylight trigger

* Cleanup

* Modified theming strategy to reduce clutter in preferences

* Updated translations for latest version

* Removed "Default" theme flavor from settings

* Updated Polish translations 🇵🇱

* Modified TwilightManager handling code to support Android M's UiModeManager features and moved it to its own function

* Updated Polish translations 🇵🇱

* Cleanup; Fixed hardcoded string

* Added missing escape in string

* Removed permission request dialog.

As we now use native UiModeManager APIs that don't need special permission for Android 6.0 and above, we no longer need to bother user with Android M+ specific location permission request dialog.

* Increased readability of ThemeUtil class

* Refactored ThemeUtils.setAppNightMode method

* Cleanup
This commit is contained in:
remi6397 2018-01-20 13:39:01 +01:00 committed by Konrad Pozniak
commit 11105f4aac
28 changed files with 341 additions and 142 deletions

View file

@ -147,7 +147,7 @@
<string name="dialog_download_image">Download</string>
<string name="dialog_message_follow_request">Follow request pending: awaiting their response</string>
<string name="dialog_unfollow_warning">Unfollow this account?</string>
<string name="dialog_reply_not_found">Couldn\'t post this status. The status you\'re replying to might not be available. Remove reply info?</string>
<string name="dialog_reply_not_found">Couldn\'t post this status. The status you\'re replying to might not be available. Remove reply info?</string>
<string name="visibility_public">Public: Post to public timelines</string>
<string name="visibility_unlisted">Unlisted: Do not show in public timelines</string>
@ -168,7 +168,20 @@
<string name="pref_title_notification_filter_reblogs">my posts are boosted</string>
<string name="pref_title_notification_filter_favourites">my posts are favourited</string>
<string name="pref_title_appearance_settings">Appearance</string>
<string name="pref_title_light_theme">Use the Light Theme</string>
<string name="pref_title_app_theme">App Theme</string>
<string-array name="app_theme_names">
<item>Tusky</item>
<item>Remin</item>
</string-array>
<string name="pref_title_app_theme_flavor">Theme flavor</string>
<string-array name="app_theme_flavor_names">
<item>Sunset/Sunrise</item>
<item>Night</item>
<item>Day</item>
</string-array>
<string name="pref_title_browser_settings">Browser</string>
<string name="pref_title_custom_tabs">Use Chrome Custom Tabs</string>
<string name="pref_title_hide_follow_button">Hide compose button while scrolling</string>
@ -280,5 +293,4 @@
<string name="action_set_caption">Set caption</string>
<string name="action_remove_media">Remove</string>
</resources>