From 3935987705848029f4b21a4f20312b9b16cef4be Mon Sep 17 00:00:00 2001 From: Bart De Vries Date: Thu, 16 Mar 2023 21:02:33 +0100 Subject: [PATCH] Re-enable Material style on Android Breeze style seems to have significant font issues on some Android devices. --- src/main.cpp | 10 +++++----- src/qtquickcontrols2.conf | 5 +++++ src/resources.qrc | 1 + 3 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 src/qtquickcontrols2.conf diff --git a/src/main.cpp b/src/main.cpp index b9028158..0b330423 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -65,20 +65,20 @@ Q_DECL_EXPORT int main(int argc, char *argv[]) { + if (QSysInfo::currentCpuArchitecture().contains(QStringLiteral("arm")) && qEnvironmentVariableIsEmpty("QT_ENABLE_GLYPH_CACHE_WORKAROUND")) { + qputenv("QT_ENABLE_GLYPH_CACHE_WORKAROUND", "1"); + } + #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); #endif - if (QSysInfo::currentCpuArchitecture().contains(QStringLiteral("arm")) && qEnvironmentVariableIsEmpty("QT_ENABLE_GLYPH_CACHE_WORKAROUND")) { - qputenv("QT_ENABLE_GLYPH_CACHE_WORKAROUND", "1"); - } - #ifdef Q_OS_ANDROID QGuiApplication app(argc, argv); qInstallMessageHandler(myMessageHandler); QLoggingCategory::setFilterRules(QStringLiteral("org.kde.*=true")); - QQuickStyle::setStyle(QStringLiteral("org.kde.breeze")); + QQuickStyle::setStyle(QStringLiteral("Material")); #else QApplication app(argc, argv); if (qEnvironmentVariableIsEmpty("QT_QUICK_CONTROLS_STYLE")) { diff --git a/src/qtquickcontrols2.conf b/src/qtquickcontrols2.conf new file mode 100644 index 00000000..d2d7f2dc --- /dev/null +++ b/src/qtquickcontrols2.conf @@ -0,0 +1,5 @@ +[Material] +Primary=Blue +Accent=Blue +Theme=System +> diff --git a/src/resources.qrc b/src/resources.qrc index ba6dcc0d..faa6a7d5 100755 --- a/src/resources.qrc +++ b/src/resources.qrc @@ -44,6 +44,7 @@ qml/GlobalSearchField.qml qml/SearchFilterBar.qml qml/FilterInlineMessage.qml + qtquickcontrols2.conf ../kasts.svg ../icons/kasts-tray-light.svg ../icons/kasts-tray-dark.svg