Improve charts theming

This commit is contained in:
Ilya Laktyushin
2020-03-23 15:26:40 +04:00
parent 6266a29651
commit 13f7cdf401
19 changed files with 1149 additions and 1159 deletions

View File

@@ -27,7 +27,6 @@ class ChartStackSection: UIView, ChartThemeContainer {
var rangeView: RangeChartView
var visibilityView: ChartVisibilityView
var sectionContainerView: UIView
var separators: [UIView] = []
var titleLabel: UILabel!
var backButton: UIButton!
@@ -87,19 +86,13 @@ class ChartStackSection: UIView, ChartThemeContainer {
func apply(theme: ChartTheme, animated: Bool) {
self.theme = theme
UIView.perform(animated: animated && self.isVisibleInWindow) {
self.backgroundColor = theme.tableBackgroundColor
UIView.perform(animated: animated && self.isVisibleInWindow) {
self.sectionContainerView.backgroundColor = theme.chartBackgroundColor
self.rangeView.backgroundColor = theme.chartBackgroundColor
self.visibilityView.backgroundColor = theme.chartBackgroundColor
self.backButton.tintColor = theme.actionButtonColor
self.backButton.setTitleColor(theme.actionButtonColor, for: .normal)
for separator in self.separators {
separator.backgroundColor = theme.tableSeparatorColor
}
}
if rangeView.isVisibleInWindow || chartView.isVisibleInWindow {