forked from qt-creator/qt-creator
Theming: Do not set the global palette
Setting the global palette is not a very good idea, because it interferes with native styling. On Windows 7 the dark theme was unuasable, because the text on all natives controls was to bright. All native controls and the global palette should be left alone. Wherever we want styling/theming we have to use Manhatten style. Change-Id: Ia1d0bfb190e4bde7be72f751afc0846570c1189d Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -130,7 +130,6 @@ void CorePlugin::parseArguments(const QStringList &arguments)
|
|||||||
Theme *theme = new Theme(qApp);
|
Theme *theme = new Theme(qApp);
|
||||||
theme->readSettings(themeSettings);
|
theme->readSettings(themeSettings);
|
||||||
setCreatorTheme(theme);
|
setCreatorTheme(theme);
|
||||||
qApp->setPalette(creatorTheme()->palette(qApp->palette()));
|
|
||||||
|
|
||||||
// defer creation of these widgets until here,
|
// defer creation of these widgets until here,
|
||||||
// because they need a valid theme set
|
// because they need a valid theme set
|
||||||
|
@@ -435,7 +435,6 @@ void ThemeSettings::apply()
|
|||||||
{
|
{
|
||||||
d->m_ui->editor->model()->toTheme(creatorTheme());
|
d->m_ui->editor->model()->toTheme(creatorTheme());
|
||||||
QPalette newPalette = creatorTheme()->palette(qApp->palette());
|
QPalette newPalette = creatorTheme()->palette(qApp->palette());
|
||||||
qApp->setPalette(newPalette);
|
|
||||||
foreach (QWidget *w, QApplication::topLevelWidgets())
|
foreach (QWidget *w, QApplication::topLevelWidgets())
|
||||||
w->update();
|
w->update();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user