forked from qt-creator/qt-creator
Theming: allow to override base style
Change-Id: I48e2d03b83fccf3d6eb4b508bd77912dbdaea1d0 Reviewed-by: Thorben Kroeger <thorbenkroeger@gmail.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
82bbc6f562
commit
cf45c854e0
@@ -166,7 +166,18 @@ MainWindow::MainWindow() :
|
||||
&& baseName == QLatin1String("windows")) {
|
||||
baseName = QLatin1String("fusion");
|
||||
}
|
||||
qApp->setStyle(new ManhattanStyle(baseName));
|
||||
|
||||
// if the user has specified as base style in the theme settings,
|
||||
// prefer that
|
||||
const QStringList available = QStyleFactory::keys();
|
||||
foreach (const QString &s, Utils::creatorTheme()->preferredStyles()) {
|
||||
if (available.contains(s, Qt::CaseInsensitive)) {
|
||||
baseName = s;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
QApplication::setStyle(new ManhattanStyle(baseName));
|
||||
|
||||
setDockNestingEnabled(true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user