diff options
author | Allan Wang <me@allanwang.ca> | 2021-04-17 17:49:18 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2021-04-17 17:49:18 -0700 |
commit | d96d1d06a7c1581b97c042f2a74e7cd5b1c2546e (patch) | |
tree | 60ad049189d448132d1b99ea041a8f80a83ffe22 /app/src/main/kotlin/com/pitchedapps/frost/enums | |
parent | cb2adc75d8e105adfdf0d5646c1a9b6d39c292f8 (diff) | |
download | frost-d96d1d06a7c1581b97c042f2a74e7cd5b1c2546e.tar.gz frost-d96d1d06a7c1581b97c042f2a74e7cd5b1c2546e.tar.bz2 frost-d96d1d06a7c1581b97c042f2a74e7cd5b1c2546e.zip |
Update theme providers and readd koin modules
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/enums')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/enums/MainActivityLayout.kt | 12 | ||||
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/enums/Theme.kt | 36 |
2 files changed, 32 insertions, 16 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/enums/MainActivityLayout.kt b/app/src/main/kotlin/com/pitchedapps/frost/enums/MainActivityLayout.kt index ec438df1..4a274b9b 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/enums/MainActivityLayout.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/enums/MainActivityLayout.kt @@ -28,13 +28,17 @@ enum class MainActivityLayout( val iconColor: (ThemeProvider) -> Int ) { - TOP_BAR(R.string.top_bar, + TOP_BAR( + R.string.top_bar, { it.headerColor }, - { it.iconColor }), + { it.iconColor } + ), - BOTTOM_BAR(R.string.bottom_bar, + BOTTOM_BAR( + R.string.bottom_bar, { it.bgColor }, - { it.textColor }); + { it.textColor } + ); companion object { val values = values() // save one instance diff --git a/app/src/main/kotlin/com/pitchedapps/frost/enums/Theme.kt b/app/src/main/kotlin/com/pitchedapps/frost/enums/Theme.kt index 1c9d6aa5..fc6f6f9d 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/enums/Theme.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/enums/Theme.kt @@ -39,53 +39,65 @@ enum class Theme( val iconColorGetter: (ThemePrefs) -> Int ) { - DEFAULT(R.string.kau_default, + DEFAULT( + R.string.kau_default, "default", { 0xde000000.toInt() }, { FACEBOOK_BLUE }, { 0xfffafafa.toInt() }, { FACEBOOK_BLUE }, - { Color.WHITE }), + { Color.WHITE } + ), - LIGHT(R.string.kau_light, + LIGHT( + R.string.kau_light, "material_light", { 0xde000000.toInt() }, { FACEBOOK_BLUE }, { 0xfffafafa.toInt() }, { FACEBOOK_BLUE }, - { Color.WHITE }), + { Color.WHITE } + ), - DARK(R.string.kau_dark, + DARK( + R.string.kau_dark, "material_dark", { Color.WHITE }, { BLUE_LIGHT }, { 0xff303030.toInt() }, { 0xff2e4b86.toInt() }, - { Color.WHITE }), + { Color.WHITE } + ), - AMOLED(R.string.kau_amoled, + AMOLED( + R.string.kau_amoled, "material_amoled", { Color.WHITE }, { BLUE_LIGHT }, { Color.BLACK }, { Color.BLACK }, - { Color.WHITE }), + { Color.WHITE } + ), - GLASS(R.string.kau_glass, + GLASS( + R.string.kau_glass, "material_glass", { Color.WHITE }, { BLUE_LIGHT }, { 0x80000000.toInt() }, { 0xb3000000.toInt() }, - { Color.WHITE }), + { Color.WHITE } + ), - CUSTOM(R.string.kau_custom, + CUSTOM( + R.string.kau_custom, "custom", { it.customTextColor }, { it.customAccentColor }, { it.customBackgroundColor }, { it.customHeaderColor }, - { it.customIconColor }); + { it.customIconColor } + ); @VisibleForTesting internal val file = file?.let { "$it.css" } |