Minor refactoring
This commit is contained in:
parent
a49668b473
commit
effd3f39b2
@ -768,21 +768,21 @@ QString loadStyleSheet()
|
|||||||
{
|
{
|
||||||
QString styleSheet;
|
QString styleSheet;
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
|
QString cssName;
|
||||||
QString theme = settings.value("theme", "").toString();
|
QString theme = settings.value("theme", "").toString();
|
||||||
|
|
||||||
if(!theme.isEmpty()){
|
if(!theme.isEmpty()){
|
||||||
QFile qFile(QString(":/css/") + theme);
|
cssName = QString(":/css/") + theme;
|
||||||
if (qFile.open(QFile::ReadOnly)) {
|
|
||||||
styleSheet = QLatin1String(qFile.readAll());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
QFile qFile(":/css/drkblue");
|
cssName = QString(":/css/drkblue");
|
||||||
if (qFile.open(QFile::ReadOnly)) {
|
|
||||||
styleSheet = QLatin1String(qFile.readAll());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QFile qFile(cssName);
|
||||||
|
if (qFile.open(QFile::ReadOnly)) {
|
||||||
|
styleSheet = QLatin1String(qFile.readAll());
|
||||||
|
}
|
||||||
|
|
||||||
return styleSheet;
|
return styleSheet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user