Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions client/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@
#include <QtCore/QCommandLineParser>
#include <QtCore/QDebug>
#include <QtCore/QStandardPaths>
#include <QtWidgets/QStyleFactory>

#include "networksettings.h"
#include "mainwindow.h"
#include "activitydetector.h"
#include "linuxutils.h"
#include <settings.h>

void loadTranslations(
Expand Down Expand Up @@ -93,6 +95,22 @@ int main( int argc, char* argv[] )
QApplication::setFont(font);
}

#if defined Q_OS_UNIX && !defined Q_OS_MAC
const auto useBreezeStyle = Quotient::Settings().get("UI/use_breeze_style", inFlatpak());

// Set style to Breeze since Qt applications defaults to
// a very ugly Fusion style in Flatpak outside KDE
if (useBreezeStyle)
{
// Set icon theme as well to have uniform design
QApplication::setStyle("Breeze");
QIcon::setThemeName("breeze");
#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)
QIcon::setFallbackThemeName("breeze");
#endif
}
#endif

// We should not need to do the following, as quitOnLastWindowClosed is
// set to "true" by default; might be a bug, see
// https://forum.qt.io/topic/71112/application-does-not-quit
Expand Down
8 changes: 8 additions & 0 deletions client/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,14 @@ void MainWindow::createMenu()
else
defaultLayout->setChecked(true);
}
#if defined Q_OS_UNIX && !defined Q_OS_MAC
addTimelineOptionCheckbox(
settingsMenu,
tr("Use Breeze style (requires restart)"),
tr("Force use Breeze style and icon theme"),
QStringLiteral("use_breeze_style"), inFlatpak()
);
#endif
addTimelineOptionCheckbox(
settingsMenu,
tr("Use shuttle scrollbar (requires restart)"),
Expand Down