Commit 0c2955e1 by Orkhan Alikhanov

Made ToolbarController themeable

parent 3c020dc8
......@@ -73,6 +73,24 @@ open class ToolbarController: StatusBarController {
prepareToolbar()
}
open override func apply(theme: Theme) {
super.apply(theme: theme)
toolbar.backgroundColor = theme.primary
toolbar.titleLabel.textColor = theme.onPrimary
toolbar.detailLabel.textColor = theme.onPrimary
(toolbar.leftViews + toolbar.rightViews + toolbar.centerViews).compactMap {
$0 as? IconButton
}.filter {
$0.isThemingEnabled
}.forEach {
$0.tintColor = theme.onPrimary
$0.titleColor = theme.onPrimary
$0.pulseColor = theme.onPrimary
}
}
}
fileprivate extension ToolbarController {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment