diff options
author | Allan Wang <me@allanwang.ca> | 2017-08-19 09:47:05 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-19 09:47:05 -0700 |
commit | 84bf883a47b956865d31b1b618d5495fcd7d4876 (patch) | |
tree | 0fb0f83af4862a127bca7d8451ef2c7188a08d83 /app/src/main/kotlin/com/pitchedapps/frost/injectors/CssAssets.kt | |
parent | 5d9a3fd7fb8f2f9d0f592c89446824980c9841c6 (diff) | |
download | frost-1.4.7.tar.gz frost-1.4.7.tar.bz2 frost-1.4.7.zip |
v1.4.7 (#195)v1.4.7
* Add try catch (#179)
* Add checks before injections (#180)
* Enhancement/url redirect manager (#182)
* Initial blacklist
* Move js checks to java
* Optimize imports and clean up request interceptor
* Misc (#190)
* Update play store description
* Finalize description
* Update kotlin and bg2 for custom themes
* Update to Android Studio 3.0 beta 2
* Update test dependencies and add logging to image activity
* Rename throwable to errorRef
* Update searchview and media picker through kau
* Update themes (#183)
* Theme content now found view
* Update verified bg and bg2 for transparent themes
* Fix check in star text
* Various fixes
* Create base svg sass images
* Feature/theme accent (#192)
* Add lots of theming components
* Optimize and add
* Update accents
* Misc 2 (#191)
* Add further checks for iab and remove generic error dialog
* Theme all snackbars
* Add dynamic media action tile
* Enhancement/media-camera-picker (#194)
* Update kau
* Update changelog
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/injectors/CssAssets.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/injectors/CssAssets.kt | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/injectors/CssAssets.kt b/app/src/main/kotlin/com/pitchedapps/frost/injectors/CssAssets.kt index 733bc151..cf935360 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/injectors/CssAssets.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/injectors/CssAssets.kt @@ -25,21 +25,19 @@ enum class CssAssets(val folder: String = "themes") : InjectorContract { try { var content = webView.context.assets.open("css/$folder/$file").bufferedReader().use { it.readText() } if (this == CUSTOM) { - var bbt = Prefs.bgColor val bt: String - if (Color.alpha(bbt) == 255) { - bbt = bbt.adjustAlpha(0.2f).colorToForeground(0.35f) + if (Color.alpha(Prefs.bgColor) == 255) { bt = Prefs.bgColor.toRgbaString() } else { - bbt = bbt.adjustAlpha(0.05f).colorToForeground(0.5f) bt = "transparent" } content = content .replace("\$T\$", Prefs.textColor.toRgbaString()) .replace("\$TT\$", Prefs.textColor.colorToBackground(0.05f).toRgbaString()) + .replace("\$A\$", Prefs.accentColor.toRgbaString()) .replace("\$B\$", Prefs.bgColor.toRgbaString()) .replace("\$BT\$", bt) - .replace("\$BBT\$", bbt.toRgbaString()) + .replace("\$BBT\$", Prefs.bgColor.withAlpha(51).colorToForeground(0.35f).toRgbaString()) .replace("\$O\$", Prefs.bgColor.withAlpha(255).toRgbaString()) .replace("\$OO\$", Prefs.bgColor.colorToForeground(0.35f).withAlpha(255).toRgbaString()) .replace("\$D\$", Prefs.textColor.adjustAlpha(0.3f).toRgbaString()) |