From b97d78be530a6b1f198499f551dd4770a81f55a1 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sat, 24 Jun 2017 09:51:05 -0700 Subject: Fix up themes --- app/src/main/assets/css/themes/custom.compact.css | 2 +- app/src/main/assets/css/themes/custom.scss | 3 +-- .../main/kotlin/com/pitchedapps/frost/injectors/CssAssets.kt | 2 +- app/src/main/kotlin/com/pitchedapps/frost/utils/Theme.kt | 4 ++-- app/src/main/res/xml/changelog.xml | 12 +++++++++++- docs/Changelog.md | 7 ++++++- 6 files changed, 22 insertions(+), 8 deletions(-) diff --git a/app/src/main/assets/css/themes/custom.compact.css b/app/src/main/assets/css/themes/custom.compact.css index 5711b7ae..bf397fd2 100644 --- a/app/src/main/assets/css/themes/custom.compact.css +++ b/app/src/main/assets/css/themes/custom.compact.css @@ -6,7 +6,7 @@ body, #root, #header, [style*="background-color"], ._55wo, ._1upc, input, ._2f9r .jewel, .flyout, ._13e_, ._5-lw, ._5c0e, .jx-result, ._336p { background: $O$ !important; } -button, button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before, ._590n, ._4g8h, ._5xo2, ._5u5a::before, ._4u3j, ._15ks, ._5hua, ._59tt, ._41ft, .jx-tokenizer, ._55fj, .excessItem, ._4e8n, ._5pxa._3uj9, ._5n_5, ._u2d, ._56bu::before, ._5h8f, ._d00, ._2066, ._4qax, .aclb, ._4756, ._w34, ._56bv::before, ._5769, ._34iv, .acbk { background: $BB$ !important; } +button, button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before, ._590n, ._4g8h, ._5xo2, ._5u5a::before, ._4u3j, ._15ks, ._5hua, ._59tt, ._41ft, .jx-tokenizer, ._55fj, .excessItem, ._4e8n, ._5pxa._3uj9, ._5n_5, ._u2d, ._56bu::before, ._5h8f, ._d00, ._2066, ._4qax, .aclb, ._4756, ._w34, ._56bv::before, ._5769, ._34iv, .acbk { background: $BBT$ !important; } [style*="color"], body, input, ._43mh, .touch .btn, p, span, .fcg, button, ._52j9, ._52jb, ._52ja, ._5j35, ._rnk, ._24u0, ._1g06, ._14ye, .fcb, ._56cz._56c_, ._1gk_, ._55fj, textarea, ._24pi, ._4en9, ._1kb, ._5p7j, ._2klz, ._5780, ._5781, ._5782, ._3u9u, ._3u9_, ._3u9s, ._1hcx, ._2066, ._1_-1, ._cv_, ._1nbx, ._2cuh, ._4ms9, ._4ms5, ._4ms6, ._31b4, ._31b5, ._27vp, ._4nwe, ._4nw9, ._27vi, .appCenterAppInfo, .appCenterPermissions, ._3c9l, ._3c9m, ._4jn_, ._32qt, ._3mom, ._3moo, ._-7o, ._d00, ._d01, ._559g, ._2new, .appCenterCategorySelectorButton, .mentions-input, .mentions-placeholder, .fcw, ._5-7t, .fcl, ._4qas, .thread-title, .title, ._46pa, ._336p, ._1rrd, ._2om4, ._3m1m, ._2om2, ._5n_e, .appListExplanation, h1, h2, h3, h4, h5, h6 { color: $T$ !important; } diff --git a/app/src/main/assets/css/themes/custom.scss b/app/src/main/assets/css/themes/custom.scss index 24b36760..1a3013a9 100644 --- a/app/src/main/assets/css/themes/custom.scss +++ b/app/src/main/assets/css/themes/custom.scss @@ -2,9 +2,8 @@ $bg_transparent: transparent; $text: unquote('$T$'); $link: unquote('$TT$'); $background: unquote('$B$'); -$background2: unquote('$BB$'); +$background2: unquote('$BBT$'); $bg_opaque: unquote('$O$'); $divider: unquote('$D$'); - @import "../core/main"; 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 3a7346e0..178a072f 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/injectors/CssAssets.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/injectors/CssAssets.kt @@ -25,7 +25,7 @@ enum class CssAssets(val folder: String = "themes") : InjectorContract { .replace("\$T\$", Prefs.textColor.toRgbaString()) .replace("\$TT\$", Prefs.textColor.colorToBackground(0.05f).toRgbaString()) .replace("\$B\$", Prefs.bgColor.toRgbaString()) - .replace("\$BB\$", Prefs.bgColor.colorToForeground(0.05f).toRgbaString()) + .replace("\$BBT\$", Prefs.bgColor.adjustAlpha(0.2f).colorToForeground(0.05f).toRgbaString()) .replace("\$O\$", Prefs.bgColor.withAlpha(255).toRgbaString()) .replace("\$D\$", Prefs.textColor.adjustAlpha(0.3f).toRgbaString()) } diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/Theme.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/Theme.kt index b4162a66..8e45848f 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/utils/Theme.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/Theme.kt @@ -13,8 +13,8 @@ import com.pitchedapps.frost.injectors.JsActions enum class Theme(@StringRes val textRes: Int, val injector: InjectorContract, private val textColorGetter: () -> Int, private val backgroundColorGetter: () -> Int, private val headerColorGetter: () -> Int, private val iconColorGetter: () -> Int) { - DEFAULT(R.string.kau_default, JsActions.EMPTY, { Color.BLACK }, { 0xfffafafa.toInt() }, { 0xff3b5998.toInt() }, { Color.WHITE }), - LIGHT(R.string.kau_light, CssAssets.MATERIAL_LIGHT, { Color.BLACK }, { 0xfffafafa.toInt() }, { 0xff3b5998.toInt() }, { Color.WHITE }), + DEFAULT(R.string.kau_default, JsActions.EMPTY, { 0xddffffff.toInt() }, { 0xfffafafa.toInt() }, { 0xff3b5998.toInt() }, { Color.WHITE }), + LIGHT(R.string.kau_light, CssAssets.MATERIAL_LIGHT, { 0xddffffff.toInt() }, { 0xfffafafa.toInt() }, { 0xff3b5998.toInt() }, { Color.WHITE }), DARK(R.string.kau_dark, CssAssets.MATERIAL_DARK, { Color.WHITE }, { 0xff303030.toInt() }, { 0xff2e4b86.toInt() }, { Color.WHITE }), AMOLED(R.string.kau_amoled, CssAssets.MATERIAL_AMOLED, { Color.WHITE }, { Color.BLACK }, { Color.BLACK }, { Color.WHITE }), GLASS(R.string.kau_glass, CssAssets.MATERIAL_GLASS, { Color.WHITE }, { 0x80000000.toInt() }, { 0xb3000000.toInt() }, { Color.WHITE }), diff --git a/app/src/main/res/xml/changelog.xml b/app/src/main/res/xml/changelog.xml index f7eac783..a2275309 100644 --- a/app/src/main/res/xml/changelog.xml +++ b/app/src/main/res/xml/changelog.xml @@ -6,10 +6,20 @@ --> + + + + + + + + + + - + diff --git a/docs/Changelog.md b/docs/Changelog.md index 619a28af..3022cc86 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -1,9 +1,14 @@ # Changelog +## v0.x +* Added more global preferences +* Added fully customizable theme engine +* Added support for in app billing + ## v0.3 * Added rounded icons option * Sorted preferences -* Added adblock +* Added adblock base * Added feed configurations * Animated settings panels * Add notification filters -- cgit v1.2.3