[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdenlive] src: Activate breeze widget style by default if Desktop Session is not using Breeze or Ox
From: Jean-Baptiste Mardelle <jb () kdenlive ! org>
Date: 2015-12-31 17:06:57
Message-ID: E1aEggj-0000Lt-8i () scm ! kde ! org
[Download RAW message or body]
Git commit 993f76888959cfe35670432edfd0e806f7462133 by Jean-Baptiste Mardelle.
Committed on 31/12/2015 at 17:06.
Pushed by mardelle into branch 'master'.
Activate breeze widget style by default if Desktop Session is not using Breeze or \
Oxygen style
M +10 -1 src/mainwindow.cpp
http://commits.kde.org/kdenlive/993f76888959cfe35670432edfd0e806f7462133
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 77e0036..d8a7bb1 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -176,7 +176,16 @@ MainWindow::MainWindow(const QString &MltPath, const QUrl &Url, \
const QString & ThemeManager::instance()->setThemeMenuAction(themeAction);
ThemeManager::instance()->setCurrentTheme(KdenliveSettings::colortheme());
connect(ThemeManager::instance(), SIGNAL(signalThemeChanged(const QString &)), \
this, SLOT(slotThemeChanged(const QString &)), Qt::DirectConnection);
- if (!KdenliveSettings::widgetstyle().isEmpty()) {
+
+ QString desktopStyle = QApplication::style()->objectName();
+ if (!desktopStyle.isEmpty() && QString::compare(desktopStyle, \
QLatin1String("breeze"), Qt::CaseInsensitive) != 0 && QString::compare(desktopStyle, \
QLatin1String("oxygen"), Qt::CaseInsensitive) != 0 && \
KdenliveSettings::widgetstyle().isEmpty()) { + if \
(availableStyles.contains(QLatin1String("breeze"), Qt::CaseInsensitive)) { + \
// Auto switch to Breeze theme + \
KdenliveSettings::setWidgetstyle(QStringLiteral("Breeze")); + }
+ }
+
+ if (!KdenliveSettings::widgetstyle().isEmpty() && QString::compare(desktopStyle, \
KdenliveSettings::widgetstyle(), Qt::CaseInsensitive) != 0) { // User wants a custom \
widget style, init doChangeStyle();
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic