aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/settings/Appearance.kt
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/settings/Appearance.kt')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/settings/Appearance.kt13
1 files changed, 12 insertions, 1 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/settings/Appearance.kt b/app/src/main/kotlin/com/pitchedapps/frost/settings/Appearance.kt
index e37afc33..7dff5b16 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/settings/Appearance.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/settings/Appearance.kt
@@ -55,7 +55,7 @@ fun SettingsActivity.getAppearancePrefs(): KPrefAdapterBuilder.() -> Unit = {
fun KPrefColorPicker.KPrefColorContract.dependsOnCustom() {
enabler = { Prefs.isCustomTheme }
- onDisabledClick = { itemView, _, _ -> itemView.frostSnackbar(R.string.requires_custom_theme); true }
+ onDisabledClick = { itemView, _, _ -> frostSnackbar(R.string.requires_custom_theme); true }
allowCustom = true
}
@@ -73,6 +73,17 @@ fun SettingsActivity.getAppearancePrefs(): KPrefAdapterBuilder.() -> Unit = {
allowCustomAlpha = false
}
+ colorPicker(R.string.accent_color, { Prefs.customAccentColor }, {
+ Prefs.customAccentColor = it
+ reload()
+ invalidateCustomTheme()
+ shouldRestartMain()
+ }) {
+ dependsOnCustom()
+ allowCustomAlpha = false
+ }
+
+
colorPicker(R.string.background_color, { Prefs.customBackgroundColor }, {
Prefs.customBackgroundColor = it
bgCanvas.ripple(it, duration = 500L)