respech "enabled" check in custom colors
This commit is contained in:
parent
637411a0d6
commit
efe3c3f8db
1 changed files with 10 additions and 5 deletions
|
@ -330,6 +330,10 @@ uint qHash(const SkinEnums::PaletteColors& key) {
|
|||
|
||||
QVariant Skin::colorForModel(SkinEnums::PaletteColors type, bool ignore_custom_colors) const {
|
||||
if (!ignore_custom_colors) {
|
||||
bool enabled = qApp->settings()->value(GROUP(CustomSkinColors),
|
||||
SETTING(CustomSkinColors::Enabled)).toBool();
|
||||
|
||||
if (enabled) {
|
||||
const QMetaObject& mo = SkinEnums::staticMetaObject;
|
||||
QMetaEnum enumer = mo.enumerator(mo.indexOfEnumerator(QSL("PaletteColors").toLocal8Bit().constData()));
|
||||
QColor custom_clr = qApp->settings()->value(GROUP(CustomSkinColors), enumer.valueToKey(int(type))).toString();
|
||||
|
@ -338,6 +342,7 @@ QVariant Skin::colorForModel(SkinEnums::PaletteColors type, bool ignore_custom_c
|
|||
return custom_clr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return m_colorPalette.contains(type)
|
||||
? m_colorPalette[type]
|
||||
|
|
Loading…
Add table
Reference in a new issue