diff options
author | Allan Wang <me@allanwang.ca> | 2017-07-16 20:23:42 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-16 20:23:42 -0700 |
commit | 7bf93ea74b00ab7e8ceedac2aac6ad08fdf099ab (patch) | |
tree | 6599e231184130f9438b7f76d3141f259510495a /app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt | |
parent | d90cb9b61cd2e033b46f4780ad1340c5f35b7751 (diff) | |
download | frost-7bf93ea74b00ab7e8ceedac2aac6ad08fdf099ab.tar.gz frost-7bf93ea74b00ab7e8ceedac2aac6ad08fdf099ab.tar.bz2 frost-7bf93ea74b00ab7e8ceedac2aac6ad08fdf099ab.zip |
Test against proguard and fix minor details (#67)v1.3.1
* Reenable enum in proguard rules
* Add missing permission and upload to beta
* Use kau permission const
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt index f8c7af56..63e57554 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt @@ -65,16 +65,10 @@ object Prefs : KPref() { get() = if (headerColor.isColorVisibleOn(bgColor, 100)) headerColor else textColor /** - * Ensures that the color is visible against both the foreground and background + * Ensures that the color is visible against the background */ - val accentBackgroundColor: Int - get() { - if (headerColor.isColorVisibleOn(textColor, 100)) { - if (headerColor.isColorVisibleOn(bgColor, 100)) return headerColor - else return headerColor.colorToForeground(0.2f) - } - return bgColor.colorToForeground(0.2f) - } + val iconBackgroundColor: Int + get() = if (headerColor.isColorVisibleOn(bgColor)) headerColor else headerColor.colorToForeground(0.2f) val themeInjector: InjectorContract get() = t.injector |