mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
OP-1088 Switched to use 'Fusion' style on the application
This commit is contained in:
parent
e6a8d8f02c
commit
9b50c26e8f
@ -50,7 +50,9 @@
|
|||||||
#include "ioutputpane.h"
|
#include "ioutputpane.h"
|
||||||
#include "icorelistener.h"
|
#include "icorelistener.h"
|
||||||
#include "iconfigurableplugin.h"
|
#include "iconfigurableplugin.h"
|
||||||
#include "manhattanstyle.h"
|
|
||||||
|
#include <qstylefactory.h>
|
||||||
|
|
||||||
#include "rightpane.h"
|
#include "rightpane.h"
|
||||||
#include "settingsdialog.h"
|
#include "settingsdialog.h"
|
||||||
#include "threadmanager.h"
|
#include "threadmanager.h"
|
||||||
@ -140,20 +142,7 @@ MainWindow::MainWindow() :
|
|||||||
QCoreApplication::setOrganizationName(QLatin1String("OpenPilot"));
|
QCoreApplication::setOrganizationName(QLatin1String("OpenPilot"));
|
||||||
QCoreApplication::setOrganizationDomain(QLatin1String("openpilot.org"));
|
QCoreApplication::setOrganizationDomain(QLatin1String("openpilot.org"));
|
||||||
QSettings::setDefaultFormat(XmlConfig::XmlSettingsFormat);
|
QSettings::setDefaultFormat(XmlConfig::XmlSettingsFormat);
|
||||||
QString baseName = qApp->style()->objectName();
|
qApp->setStyle(QStyleFactory::create("Fusion"));
|
||||||
#ifdef Q_WS_X11
|
|
||||||
if (baseName == QLatin1String("windows")) {
|
|
||||||
// Sometimes we get the standard windows 95 style as a fallback
|
|
||||||
// e.g. if we are running on a KDE4 desktop
|
|
||||||
QByteArray desktopEnvironment = qgetenv("DESKTOP_SESSION");
|
|
||||||
if (desktopEnvironment == "kde") {
|
|
||||||
baseName = QLatin1String("plastique");
|
|
||||||
} else {
|
|
||||||
baseName = QLatin1String("cleanlooks");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
qApp->setStyle(new ManhattanStyle(baseName));
|
|
||||||
|
|
||||||
setDockNestingEnabled(true);
|
setDockNestingEnabled(true);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user