Skip to content

Commit 305d3fa

Browse files
committed
src/main: make using a qapplication use org.kde.breeze not desktop
This fixes QApplication causing org.kde.desktop to be used. This theme is broken and ugly since everything was built to support org.kde.breeze. This checks if org.kde.desktop is set, then sets the style to org.kde.breeze with desktop as the fallback.
1 parent 6269d21 commit 305d3fa

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/main.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,13 @@ int main(int argc, char *argv[])
306306

307307
#if defined(Q_OS_MACOS) || defined(Q_OS_WIN)
308308
QQuickStyle::setStyle(QStringLiteral("FluentWinUI3"));
309+
#else
310+
/* Try to avoid overriding the default theme unless it's org.kde.desktop */
311+
if (QQuickStyle::name() == "org.kde.desktop")
312+
{
313+
QQuickStyle::setStyle(QStringLiteral("org.kde.breeze"));
314+
QQuickStyle::setFallbackStyle(QStringLiteral("org.kde.desktop"));
315+
}
309316
#endif // defined(Q_OS_MACOS) || defined(Q_OS_WIN)
310317

311318
QQmlApplicationEngine engine;

0 commit comments

Comments
 (0)