aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt18
1 files changed, 0 insertions, 18 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt
index 557980af..a479cb83 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt
@@ -167,24 +167,6 @@ fun WebOverlayActivity.url(): String {
return intent.getStringExtra(ARG_URL) ?: FbItem.FEED.url
}
-fun Context.materialDialogThemed(action: MaterialDialog.Builder.() -> Unit): MaterialDialog {
- val builder = MaterialDialog.Builder(this).theme()
- builder.action()
- return builder.show()
-}
-
-fun MaterialDialog.Builder.theme(): MaterialDialog.Builder {
- val dimmerTextColor = Prefs.textColor.adjustAlpha(0.8f)
- titleColor(Prefs.textColor)
- contentColor(dimmerTextColor)
- widgetColor(dimmerTextColor)
- backgroundColor(Prefs.bgColor.lighten(0.1f).withMinAlpha(200))
- positiveColor(Prefs.textColor)
- negativeColor(Prefs.textColor)
- neutralColor(Prefs.textColor)
- return this
-}
-
fun Activity.setFrostTheme(forceTransparent: Boolean = false) {
val isTransparent =
(Color.alpha(Prefs.bgColor) != 255) || (Color.alpha(Prefs.headerColor) != 255) || forceTransparent