forked from qt-creator/qt-creator
Utils: Allow named colors for theme's palette section
This change allows color definitions like [Palette] a=ffff0000 b=a with some restrictions: - the name "style" results in QColor() (behavior change) - the named color must be alphabetical less than the key (due to QSettings::allKeys()) Change-Id: Idaa8569ce1e5b8502d287fd42b0ee7b75dc8b5d6 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
committed by
Alessandro Portale
parent
96d04570c8
commit
6015ed133a
@@ -182,10 +182,8 @@ void Theme::readSettings(QSettings &settings)
|
||||
}
|
||||
{
|
||||
settings.beginGroup(QLatin1String("Palette"));
|
||||
foreach (const QString &key, settings.allKeys()) {
|
||||
QColor c = readColor(settings.value(key).toString());
|
||||
d->palette[key] = c;
|
||||
}
|
||||
foreach (const QString &key, settings.allKeys())
|
||||
d->palette[key] = readNamedColor(settings.value(key).toString()).first;
|
||||
settings.endGroup();
|
||||
}
|
||||
{
|
||||
|
Reference in New Issue
Block a user