1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Use Fusion by default if available

Only on first run, if you explicitely choose no style or another style, we don't change that. Fallback to no style if fusion isn't available.
This commit is contained in:
Tux3 / Mlkj / !Lev.uXFMLA 2014-11-09 01:10:06 +01:00
parent 3d9cc86e30
commit c05752d5a2
No known key found for this signature in database
GPG Key ID: 7E086DD661263264

View File

@ -26,6 +26,7 @@
#include <QStandardPaths>
#include <QDebug>
#include <QList>
#include <QStyleFactory>
const QString Settings::FILENAME = "settings.ini";
bool Settings::makeToxPortable{false};
@ -140,8 +141,15 @@ void Settings::load()
minimizeToTray = s.value("minimizeToTray", false).toBool();
useNativeStyle = s.value("nativeStyle", false).toBool();
useEmoticons = s.value("useEmoticons", true).toBool();
style = s.value("style", "None").toString();
statusChangeNotificationEnabled = s.value("statusChangeNotificationEnabled", false).toBool();
style = s.value("style", "").toString();
if (style == "") // Default to Fusion if available, otherwise no style
{
if (QStyleFactory::keys().contains("Fusion"))
style = "Fusion";
else
style = "None";
}
s.endGroup();
s.beginGroup("State");