diff options
author | Allan Wang <me@allanwang.ca> | 2021-01-12 21:15:08 -0800 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2021-01-12 21:15:08 -0800 |
commit | e01e51574613459a036c1d60383bfb229799a407 (patch) | |
tree | 4214c9803638fcc1b9d9e19159651f7115c846c4 /app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt | |
parent | 0e5c1ab2dd2b574970883576e18f9a119b058788 (diff) | |
download | frost-e01e51574613459a036c1d60383bfb229799a407.tar.gz frost-e01e51574613459a036c1d60383bfb229799a407.tar.bz2 frost-e01e51574613459a036c1d60383bfb229799a407.zip |
Convert all theme access to themeprovider
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt index c21f7362..42d84eb7 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt @@ -202,14 +202,14 @@ abstract class WebOverlayActivityBase(private val userAgent: String = USER_AGENT setSupportActionBar(toolbar) supportActionBar?.setDisplayShowHomeEnabled(true) supportActionBar?.setDisplayHomeAsUpEnabled(true) - toolbar.navigationIcon = GoogleMaterial.Icon.gmd_close.toDrawable(this, 16, prefs.iconColor) + toolbar.navigationIcon = GoogleMaterial.Icon.gmd_close.toDrawable(this, 16, themeProvider.iconColor) toolbar.setNavigationOnClickListener { finishSlideOut() } setFrostColors { toolbar(toolbar) themeWindow = false } - coordinator.setBackgroundColor(prefs.bgColor.withAlpha(255)) + coordinator.setBackgroundColor(themeProvider.bgColor.withAlpha(255)) content.bind(this) @@ -268,13 +268,13 @@ abstract class WebOverlayActivityBase(private val userAgent: String = USER_AGENT * Our theme for the overlay should be fully opaque */ fun theme() { - val opaqueAccent = prefs.headerColor.withAlpha(255) + val opaqueAccent = themeProvider.headerColor.withAlpha(255) statusBarColor = opaqueAccent.darken() navigationBarColor = opaqueAccent toolbar.setBackgroundColor(opaqueAccent) - toolbar.setTitleTextColor(prefs.iconColor) - coordinator.setBackgroundColor(prefs.bgColor.withAlpha(255)) - toolbar.overflowIcon?.setTint(prefs.iconColor) + toolbar.setTitleTextColor(themeProvider.iconColor) + coordinator.setBackgroundColor(themeProvider.bgColor.withAlpha(255)) + toolbar.overflowIcon?.setTint(themeProvider.iconColor) } override fun onResume() { @@ -309,7 +309,7 @@ abstract class WebOverlayActivityBase(private val userAgent: String = USER_AGENT override fun onCreateOptionsMenu(menu: Menu): Boolean { menuInflater.inflate(R.menu.menu_web, menu) overlayContext?.onMenuCreate(this, menu) - toolbar.tint(prefs.iconColor) + toolbar.tint(themeProvider.iconColor) return true } |