aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-06-07 15:13:18 -0400
committerAllan Wang <me@allanwang.ca>2019-06-07 15:13:18 -0400
commit03480c2495ec9a1fcdecce9d2a54382bee583618 (patch)
tree8180050fb68e5bbd907b33a5d097e47ef0a52a44 /app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt
parent1c2109cc583633c369688000c5a55c3a810aa8e3 (diff)
downloadfrost-03480c2495ec9a1fcdecce9d2a54382bee583618.tar.gz
frost-03480c2495ec9a1fcdecce9d2a54382bee583618.tar.bz2
frost-03480c2495ec9a1fcdecce9d2a54382bee583618.zip
Removed theme md option
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