Use DISABLE_THEME_COLORS macro

This commit is contained in:
johanneshilden 2017-09-29 21:09:22 +03:00
parent b4baf40ca1
commit dfecc15468
5 changed files with 49 additions and 15 deletions

View File

@ -19,14 +19,15 @@
- [x] Radio Button
- [x] Raised Button
- [ ] Scroll Bar
- [ ] Select Field
- [x] Slider
- [ ] Snackbar
- [x] Tabs
- [x] Text Field
- [x] Toggle
#### Needs some work
#### Needs some more work
- [x] Select Field
#### Not implemented

View File

@ -95,7 +95,9 @@ void QtMaterialProgress::setProgressColor(const QColor &color)
Q_D(QtMaterialProgress);
d->progressColor = color;
setUseThemeColors(false);
MATERIAL_DISABLE_THEME_COLORS
update();
}
QColor QtMaterialProgress::progressColor() const
@ -114,7 +116,9 @@ void QtMaterialProgress::setBackgroundColor(const QColor &color)
Q_D(QtMaterialProgress);
d->backgroundColor = color;
setUseThemeColors(false);
MATERIAL_DISABLE_THEME_COLORS
update();
}
QColor QtMaterialProgress::backgroundColor() const

View File

@ -86,7 +86,9 @@ void QtMaterialScrollBar::setCanvasColor(const QColor &color)
Q_D(QtMaterialScrollBar);
d->canvasColor = color;
setUseThemeColors(false);
MATERIAL_DISABLE_THEME_COLORS
update();
}
QColor QtMaterialScrollBar::canvasColor() const
@ -105,7 +107,9 @@ void QtMaterialScrollBar::setBackgroundColor(const QColor &color)
Q_D(QtMaterialScrollBar);
d->backgroundColor = color;
setUseThemeColors(false);
MATERIAL_DISABLE_THEME_COLORS
update();
}
QColor QtMaterialScrollBar::backgroundColor() const
@ -124,7 +128,9 @@ void QtMaterialScrollBar::setSliderColor(const QColor &color)
Q_D(QtMaterialScrollBar);
d->sliderColor = color;
setUseThemeColors(false);
MATERIAL_DISABLE_THEME_COLORS
update();
}
QColor QtMaterialScrollBar::sliderColor() const

View File

@ -137,7 +137,9 @@ void QtMaterialSelectField::setUnderlineColor(const QColor &color)
Q_D(QtMaterialSelectField);
d->underlineColor = color;
setUseThemeColors(false);
MATERIAL_DISABLE_THEME_COLORS
update();
}
QColor QtMaterialSelectField::underlineColor() const
@ -155,7 +157,9 @@ void QtMaterialSelectField::setPlaceholderColor(const QColor &color)
Q_D(QtMaterialSelectField);
d->placeholderColor = color;
setUseThemeColors(false);
MATERIAL_DISABLE_THEME_COLORS
update();
}
QColor QtMaterialSelectField::placeholderColor() const
@ -173,7 +177,9 @@ void QtMaterialSelectField::setForegroundColor(const QColor &color)
Q_D(QtMaterialSelectField);
d->foregroundColor = color;
setUseThemeColors(false);
MATERIAL_DISABLE_THEME_COLORS
update();
}
QColor QtMaterialSelectField::foregroundColor() const
@ -191,7 +197,9 @@ void QtMaterialSelectField::setHighlightedColor(const QColor &color)
Q_D(QtMaterialSelectField);
d->highlightedColor = color;
setUseThemeColors(false);
MATERIAL_DISABLE_THEME_COLORS
update();
}
QColor QtMaterialSelectField::highlightedColor() const
@ -209,7 +217,9 @@ void QtMaterialSelectField::setDisabledColor(const QColor &color)
Q_D(QtMaterialSelectField);
d->disabledColor = color;
setUseThemeColors(false);
MATERIAL_DISABLE_THEME_COLORS
update();
}
QColor QtMaterialSelectField::disabledColor() const

View File

@ -137,6 +137,10 @@ void QtMaterialSlider::setUseThemeColors(bool value)
{
Q_D(QtMaterialSlider);
if (d->useThemeColors == value) {
return;
}
d->useThemeColors = value;
d->stateMachine->setupProperties();
}
@ -153,7 +157,10 @@ void QtMaterialSlider::setThumbColor(const QColor &color)
Q_D(QtMaterialSlider);
d->thumbColor = color;
setUseThemeColors(false);
MATERIAL_DISABLE_THEME_COLORS
d->stateMachine->setupProperties();
update();
}
QColor QtMaterialSlider::thumbColor() const
@ -172,7 +179,10 @@ void QtMaterialSlider::setTrackColor(const QColor &color)
Q_D(QtMaterialSlider);
d->trackColor = color;
setUseThemeColors(false);
MATERIAL_DISABLE_THEME_COLORS
d->stateMachine->setupProperties();
update();
}
QColor QtMaterialSlider::trackColor() const
@ -191,7 +201,10 @@ void QtMaterialSlider::setDisabledColor(const QColor &color)
Q_D(QtMaterialSlider);
d->disabledColor = color;
setUseThemeColors(false);
MATERIAL_DISABLE_THEME_COLORS
d->stateMachine->setupProperties();
update();
}
QColor QtMaterialSlider::disabledColor() const