Updated gui-apps/qt6ct-kde-0.11-r4 to 0.11-r5
This commit is contained in:
@@ -194,10 +194,10 @@ index f3e9ef6..a05a9b7 100644
|
||||
|
||||
OTHER_FILES += qt6ct.json
|
||||
diff --git a/src/qt6ct-qtplugin/qt6ctplatformtheme.cpp b/src/qt6ct-qtplugin/qt6ctplatformtheme.cpp
|
||||
index 569b13f..0380ea6 100644
|
||||
index 569b13f..721e7c8 100644
|
||||
--- a/src/qt6ct-qtplugin/qt6ctplatformtheme.cpp
|
||||
+++ b/src/qt6ct-qtplugin/qt6ctplatformtheme.cpp
|
||||
@@ -41,38 +41,65 @@
|
||||
@@ -41,38 +41,74 @@
|
||||
#include <QStyleFactory>
|
||||
#include <QApplication>
|
||||
#include <QWidget>
|
||||
@@ -235,17 +235,26 @@ index 569b13f..0380ea6 100644
|
||||
+ m_fixedFont(*QGenericUnixTheme::font(QPlatformTheme::FixedFont))
|
||||
{
|
||||
Qt6CT::initConfig();
|
||||
+#ifdef QT_WIDGETS_LIB
|
||||
+ if(hasWidgets())
|
||||
+ {
|
||||
+ //styles such as Kvantum could use default QFont constructor
|
||||
+ //which results in QGuiApplicationPrivate::app_font initializing
|
||||
+ //into the wrong font as we haven't finished constructor yet
|
||||
+ const bool hadFont = QGuiApplicationPrivate::app_font;
|
||||
+ m_style.reset(QStyleFactory::create(u"qt6ct-style"_s));
|
||||
+ if(!hadFont && QGuiApplicationPrivate::app_font)
|
||||
+ {
|
||||
+ delete QGuiApplicationPrivate::app_font;
|
||||
+ QGuiApplicationPrivate::app_font = nullptr;
|
||||
+ }
|
||||
+ }
|
||||
+#endif
|
||||
if(QGuiApplication::desktopSettingsAware())
|
||||
{
|
||||
readSettings();
|
||||
- QMetaObject::invokeMethod(this, &Qt6CTPlatformTheme::applySettings, Qt::QueuedConnection);
|
||||
#ifdef QT_WIDGETS_LIB
|
||||
+ if(hasWidgets())
|
||||
+ QMetaObject::invokeMethod(this, [=] {
|
||||
+ m_style.reset(QStyleFactory::create(u"qt6ct-style"_s));
|
||||
+ }, Qt::QueuedConnection);
|
||||
+#endif
|
||||
+ QMetaObject::invokeMethod(this, &Qt6CTPlatformTheme::applySettings, Qt::QueuedConnection);
|
||||
QMetaObject::invokeMethod(this, &Qt6CTPlatformTheme::applySettings, Qt::QueuedConnection);
|
||||
-#ifdef QT_WIDGETS_LIB
|
||||
QMetaObject::invokeMethod(this, &Qt6CTPlatformTheme::createFSWatcher, Qt::QueuedConnection);
|
||||
+ //must be applied before Q_COREAPP_STARTUP_FUNCTION execution
|
||||
+ if(Qt6CT::isKColorScheme(m_schemePath))
|
||||
@@ -267,7 +276,7 @@ index 569b13f..0380ea6 100644
|
||||
}
|
||||
|
||||
Qt6CTPlatformTheme::~Qt6CTPlatformTheme()
|
||||
@@ -90,10 +117,41 @@ QPlatformDialogHelper *Qt6CTPlatformTheme::createPlatformDialogHelper(DialogType
|
||||
@@ -90,10 +126,41 @@ QPlatformDialogHelper *Qt6CTPlatformTheme::createPlatformDialogHelper(DialogType
|
||||
QGenericUnixTheme::createPlatformDialogHelper(type);
|
||||
}
|
||||
|
||||
@@ -311,7 +320,7 @@ index 569b13f..0380ea6 100644
|
||||
return QGenericUnixTheme::palette(type);
|
||||
}
|
||||
|
||||
@@ -148,6 +206,13 @@ QIcon Qt6CTPlatformTheme::fileIcon(const QFileInfo &fileInfo, QPlatformTheme::Ic
|
||||
@@ -148,6 +215,13 @@ QIcon Qt6CTPlatformTheme::fileIcon(const QFileInfo &fileInfo, QPlatformTheme::Ic
|
||||
return QIcon::fromTheme(type.iconName());
|
||||
}
|
||||
|
||||
@@ -325,7 +334,7 @@ index 569b13f..0380ea6 100644
|
||||
void Qt6CTPlatformTheme::applySettings()
|
||||
{
|
||||
if(!QGuiApplication::desktopSettingsAware() || m_isIgnored)
|
||||
@@ -156,18 +221,18 @@ void Qt6CTPlatformTheme::applySettings()
|
||||
@@ -156,18 +230,18 @@ void Qt6CTPlatformTheme::applySettings()
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -350,7 +359,7 @@ index 569b13f..0380ea6 100644
|
||||
Qt6CT::reloadStyleInstanceSettings();
|
||||
}
|
||||
|
||||
@@ -193,25 +258,28 @@ void Qt6CTPlatformTheme::applySettings()
|
||||
@@ -193,25 +267,26 @@ void Qt6CTPlatformTheme::applySettings()
|
||||
|
||||
if(m_update)
|
||||
{
|
||||
@@ -359,8 +368,6 @@ index 569b13f..0380ea6 100644
|
||||
+ QWindowSystemInterface::handleThemeChange();
|
||||
+ QCoreApplication::postEvent(qGuiApp, new QEvent(QEvent::ApplicationFontChange));
|
||||
}
|
||||
+ else if(hasWidgets()) //update color scheme after m_style has created
|
||||
+ QWindowSystemInterface::handleThemeChange();
|
||||
|
||||
#ifdef QT_WIDGETS_LIB
|
||||
if(hasWidgets() && m_update)
|
||||
@@ -387,7 +394,7 @@ index 569b13f..0380ea6 100644
|
||||
void Qt6CTPlatformTheme::createFSWatcher()
|
||||
{
|
||||
QFileSystemWatcher *watcher = new QFileSystemWatcher(this);
|
||||
@@ -230,21 +298,16 @@ void Qt6CTPlatformTheme::updateSettings()
|
||||
@@ -230,21 +305,16 @@ void Qt6CTPlatformTheme::updateSettings()
|
||||
readSettings();
|
||||
applySettings();
|
||||
}
|
||||
@@ -413,7 +420,7 @@ index 569b13f..0380ea6 100644
|
||||
m_iconTheme = settings.value("icon_theme"_L1).toString();
|
||||
//load dialogs
|
||||
if(!m_update)
|
||||
@@ -252,8 +315,9 @@ void Qt6CTPlatformTheme::readSettings()
|
||||
@@ -252,8 +322,9 @@ void Qt6CTPlatformTheme::readSettings()
|
||||
//do not mix gtk2 style and gtk3 dialogs
|
||||
QStringList keys = QPlatformThemeFactory::keys();
|
||||
QString dialogs = settings.value("standard_dialogs"_L1, u"default"_s).toString();
|
||||
@@ -424,7 +431,7 @@ index 569b13f..0380ea6 100644
|
||||
dialogs = u"gtk2"_s;
|
||||
if(keys.contains(dialogs))
|
||||
m_theme.reset(QPlatformThemeFactory::create(dialogs));
|
||||
@@ -262,10 +326,10 @@ void Qt6CTPlatformTheme::readSettings()
|
||||
@@ -262,10 +333,10 @@ void Qt6CTPlatformTheme::readSettings()
|
||||
settings.endGroup();
|
||||
|
||||
settings.beginGroup("Fonts"_L1);
|
||||
@@ -439,7 +446,7 @@ index 569b13f..0380ea6 100644
|
||||
settings.endGroup();
|
||||
|
||||
settings.beginGroup("Interface"_L1);
|
||||
@@ -354,3 +418,17 @@ QString Qt6CTPlatformTheme::loadStyleSheets(const QStringList &paths)
|
||||
@@ -354,3 +425,17 @@ QString Qt6CTPlatformTheme::loadStyleSheets(const QStringList &paths)
|
||||
content.replace(regExp, u"\n"_s);
|
||||
return content;
|
||||
}
|
||||
Reference in New Issue
Block a user