forked from openkylin/qt5-ukui-platformtheme
Update changelog 4.1.0.0-0k15
This commit is contained in:
parent
793b2ac790
commit
5550a86151
|
@ -1,3 +1,13 @@
|
|||
qt5-ukui-platformtheme (4.1.0.0-ok15) nile; urgency=medium
|
||||
|
||||
* 改动:
|
||||
BUG号:#I8JS6X部分菜单不跟随主题
|
||||
需求号:无
|
||||
其他改动:无
|
||||
影响域:无
|
||||
|
||||
-- tanjing <tanjing@kylinos.cn> Wed, 29 Nov 2023 14:27:31 +0800
|
||||
|
||||
qt5-ukui-platformtheme (4.1.0.0-ok14) nile; urgency=medium
|
||||
|
||||
* 改动:
|
||||
|
|
|
@ -14,6 +14,7 @@ Build-Depends: dbus-x11,
|
|||
libkf5iconthemes-dev,
|
||||
libkf5wayland-dev,
|
||||
libkf5windowsystem-dev,
|
||||
libkysdk-conf2-dev,
|
||||
libkysdk-waylandhelper-dev,
|
||||
libpeony-dev,
|
||||
libqt5svg5-dev,
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
etc/kylin-config/basic/org.ukui.style.yaml
|
||||
usr/lib/*/*.so.*
|
||||
usr/share/glib-2.0/schemas/org.ukui.style.gschema.xml
|
||||
|
|
|
@ -0,0 +1,618 @@
|
|||
From: tanjing <tanjing@kylinos.cn>
|
||||
Date: Wed, 29 Nov 2023 14:30:24 +0800
|
||||
Subject: Update changelog 4.1.0.0-0k15
|
||||
|
||||
---
|
||||
libqt5-ukui-style/libqt5-ukui-style.pro | 6 +-
|
||||
libqt5-ukui-style/settings/org.ukui.style.yaml | 94 +++++++++
|
||||
libqt5-ukui-style/settings/settings.pri | 4 +-
|
||||
.../settings/ukui-style-conf-settings.cpp | 231 +++++++++++++++++++++
|
||||
.../settings/ukui-style-conf-settings.h | 87 ++++++++
|
||||
libqt5-ukui-style/settings/ukui-style-settings.h | 3 +
|
||||
qt5-ukui-filedialog/qt5-ukui-filedialog.pro | 2 +-
|
||||
qt5-ukui-platformtheme/qt5-ukui-platformtheme.pro | 2 +-
|
||||
.../mps-style-application.pro | 2 +-
|
||||
.../ukui-config-style-parameters.cpp | 2 +-
|
||||
.../qt5-config-style-ukui/ukui-config-style.cpp | 1 -
|
||||
ukui-styles/readconfig.cpp | 3 +-
|
||||
ukui-styles/readconfig.h | 2 +-
|
||||
ukui-styles/ukui-styles.pro | 2 +-
|
||||
14 files changed, 431 insertions(+), 10 deletions(-)
|
||||
create mode 100644 libqt5-ukui-style/settings/org.ukui.style.yaml
|
||||
create mode 100644 libqt5-ukui-style/settings/ukui-style-conf-settings.cpp
|
||||
create mode 100644 libqt5-ukui-style/settings/ukui-style-conf-settings.h
|
||||
|
||||
diff --git a/libqt5-ukui-style/libqt5-ukui-style.pro b/libqt5-ukui-style/libqt5-ukui-style.pro
|
||||
index 07454e0..1d7a950 100644
|
||||
--- a/libqt5-ukui-style/libqt5-ukui-style.pro
|
||||
+++ b/libqt5-ukui-style/libqt5-ukui-style.pro
|
||||
@@ -27,7 +27,7 @@ DEFINES += QT_MESSAGELOGCONTEXT
|
||||
include(libqt5-ukui-style.pri)
|
||||
|
||||
CONFIG += c++11 link_pkgconfig
|
||||
-PKGCONFIG += gsettings-qt
|
||||
+PKGCONFIG += gsettings-qt gio-2.0 kysdk-conf2
|
||||
|
||||
DISTFILES += \
|
||||
org.ukui.style.gschema.xml
|
||||
@@ -40,6 +40,10 @@ unix {
|
||||
gschema.files += $$PWD/settings/org.ukui.style.gschema.xml
|
||||
INSTALLS += gschema
|
||||
|
||||
+ kconf2.path = /etc/kylin-config/basic/
|
||||
+ kconf2.files += $$PWD/settings/org.ukui.style.yaml
|
||||
+ INSTALLS += kconf2
|
||||
+
|
||||
pkgconfig.path = $$[QT_INSTALL_LIBS]/pkgconfig
|
||||
pkgconfig.files += development-files/qt5-ukui.pc
|
||||
INSTALLS += pkgconfig
|
||||
diff --git a/libqt5-ukui-style/settings/org.ukui.style.yaml b/libqt5-ukui-style/settings/org.ukui.style.yaml
|
||||
new file mode 100644
|
||||
index 0000000..68b62ca
|
||||
--- /dev/null
|
||||
+++ b/libqt5-ukui-style/settings/org.ukui.style.yaml
|
||||
@@ -0,0 +1,94 @@
|
||||
+style:
|
||||
+ 4.3.1.2:
|
||||
+ keys:
|
||||
+ blur-exception-classes:
|
||||
+ _type: s
|
||||
+ default: '[]'
|
||||
+ description: 'Example: [QWidget, QWidget1, QWidget2]'
|
||||
+ summary: a list of QWidget based classes do not blur.
|
||||
+ cursor-blink:
|
||||
+ _type: b
|
||||
+ default: 'true'
|
||||
+ description: Globally enable or disable blinking text cursor.
|
||||
+ summary: Blink text cursor.
|
||||
+ cursor-blink-time:
|
||||
+ _type: i
|
||||
+ default: '1200'
|
||||
+ description: The interval of text cursor blink.
|
||||
+ summary: Blink text cursor interval.
|
||||
+ custom-highlight-color:
|
||||
+ _type: s
|
||||
+ default: '#3D6BE5'
|
||||
+ description: Set custom highlight color for UKUI desktop environment.Now is
|
||||
+ to compatible with third party application
|
||||
+ summary: Custom highlight color
|
||||
+ enabled-global-blur:
|
||||
+ _type: b
|
||||
+ default: 'true'
|
||||
+ description: "Globally enable or disable the window blur effects for transparent\
|
||||
+ \ window.\n Setting it to \"false\" will disable the effects."
|
||||
+ summary: Enable Window Blur Effects.
|
||||
+ icon-theme-name:
|
||||
+ _type: s
|
||||
+ default: ukui-icon-theme-default
|
||||
+ description: Icon Theme for Qt Applications.Have ukui ukui-classical ukui-fashion
|
||||
+ summary: Icon Theme for Qt Applications.
|
||||
+ menu-transparency:
|
||||
+ _type: i
|
||||
+ default: '72'
|
||||
+ description: The default transparency of menu.
|
||||
+ summary: Menu's transparency.
|
||||
+ peony-side-bar-transparency:
|
||||
+ _type: i
|
||||
+ default: '72'
|
||||
+ description: The default transparency of the peony side bar.
|
||||
+ summary: Peony::SideBar's transparency.
|
||||
+ style-name:
|
||||
+ _type: s
|
||||
+ default: ukui-light
|
||||
+ description: Set style for UKUI desktop environment. Have ukui-dark ukui-default
|
||||
+ ukui-light
|
||||
+ summary: Current Qt Style
|
||||
+ system-font:
|
||||
+ _type: s
|
||||
+ default: Noto Sans CJK SC
|
||||
+ description: System Font for Qt Applications.
|
||||
+ summary: System Font for Qt Applications.
|
||||
+ system-font-size:
|
||||
+ _type: s
|
||||
+ default: '11'
|
||||
+ description: System Font Size for Qt Applications. Use point size.
|
||||
+ summary: System Font Size for Qt Applications.
|
||||
+ system-palette:
|
||||
+ _type: s
|
||||
+ default: ''
|
||||
+ description: Set default system palette for UKUI desktop environment.
|
||||
+ summary: System Palette
|
||||
+ theme-color:
|
||||
+ _type: s
|
||||
+ default: '#3790FA'
|
||||
+ description: "Set theme color for UKUI desktop environment.include default,daybreakBlue,jamPurple,magenta,sunRed,sunsetOrange,dustGold,polarGreen,\n\
|
||||
+ \ and using rgba for example \"(125,125,125) or #3790FA"
|
||||
+ summary: theme color
|
||||
+ use-custom-highlight-color:
|
||||
+ _type: b
|
||||
+ default: 'false'
|
||||
+ description: Globally enable or disable custom highlight color.Now is to compatible
|
||||
+ with third party application
|
||||
+ summary: Use custom highlight color.
|
||||
+ use-system-palette:
|
||||
+ _type: b
|
||||
+ default: 'false'
|
||||
+ description: Globally enable or disable system palette provided by ukui platform.
|
||||
+ summary: Use system palette.
|
||||
+ widget-theme-name:
|
||||
+ _type: s
|
||||
+ default: default
|
||||
+ description: Set system theme. Have default,classical and fashion
|
||||
+ summary: Current widget theme name
|
||||
+ window-radius:
|
||||
+ _type: i
|
||||
+ default: '12'
|
||||
+ description: Set the rounded corner size of the window
|
||||
+ range: 0,12
|
||||
+ summary: Window Radius
|
||||
diff --git a/libqt5-ukui-style/settings/settings.pri b/libqt5-ukui-style/settings/settings.pri
|
||||
index 9a83014..736a6f3 100644
|
||||
--- a/libqt5-ukui-style/settings/settings.pri
|
||||
+++ b/libqt5-ukui-style/settings/settings.pri
|
||||
@@ -1,10 +1,12 @@
|
||||
HEADERS += $$PWD/libqt5-ukui-style_global.h \
|
||||
+ $$PWD/ukui-style-conf-settings.h \
|
||||
$$PWD/ukui-style-settings.h \
|
||||
$$PWD/black-list.h \
|
||||
$$PWD/application-style-settings.h
|
||||
|
||||
SOURCES += $$PWD/ukui-style-settings.cpp \
|
||||
- $$PWD/application-style-settings.cpp
|
||||
+ $$PWD/application-style-settings.cpp \
|
||||
+ $$PWD/ukui-style-conf-settings.cpp
|
||||
|
||||
INCLUDEPATH += $$PWD/..
|
||||
INCLUDEPATH += $$PWD
|
||||
diff --git a/libqt5-ukui-style/settings/ukui-style-conf-settings.cpp b/libqt5-ukui-style/settings/ukui-style-conf-settings.cpp
|
||||
new file mode 100644
|
||||
index 0000000..a125e9b
|
||||
--- /dev/null
|
||||
+++ b/libqt5-ukui-style/settings/ukui-style-conf-settings.cpp
|
||||
@@ -0,0 +1,231 @@
|
||||
+/*
|
||||
+ * Qt5-UKUI's Library
|
||||
+ *
|
||||
+ * Copyright (C) 2023, KylinSoft Co., Ltd.
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 3 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with this library. If not, see <https://www.gnu.org/licenses/>.
|
||||
+ *
|
||||
+ * Authors: xibowen <xibowen@kylinos.cn>
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+#include "ukui-style-conf-settings.h"
|
||||
+#include "libkysettings.h"
|
||||
+#include <glib.h>
|
||||
+#include <QDebug>
|
||||
+
|
||||
+//char to QString
|
||||
+QString qtify_name(const char *name)
|
||||
+{
|
||||
+ bool next_cap = false;
|
||||
+ QString result;
|
||||
+
|
||||
+ while (*name) {
|
||||
+ if (*name == '-') {
|
||||
+ next_cap = true;
|
||||
+ } else if (next_cap) {
|
||||
+ result.append(QChar(*name).toUpper().toLatin1());
|
||||
+ next_cap = false;
|
||||
+ } else {
|
||||
+ result.append(*name);
|
||||
+ }
|
||||
+
|
||||
+ name++;
|
||||
+ }
|
||||
+
|
||||
+ return result;
|
||||
+}
|
||||
+
|
||||
+//QString to char
|
||||
+char * unqtify_name(const QString &name)
|
||||
+{
|
||||
+ const char *p;
|
||||
+ QByteArray bytes;
|
||||
+ GString *str;
|
||||
+
|
||||
+ bytes = name.toUtf8();
|
||||
+ str = g_string_new (NULL);
|
||||
+
|
||||
+ for (p = bytes.constData(); *p; p++) {
|
||||
+ const QChar c(*p);
|
||||
+ if (c.isUpper()) {
|
||||
+ g_string_append_c (str, '-');
|
||||
+ g_string_append_c (str, c.toLower().toLatin1());
|
||||
+ }
|
||||
+ else {
|
||||
+ g_string_append_c (str, *p);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return g_string_free(str, FALSE);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static void settingChanged(KSettings *ukuistyle_settings, const char *key, void *user_data)
|
||||
+{
|
||||
+ ukuiStyleConfSettings *self = (ukuiStyleConfSettings *)user_data;
|
||||
+
|
||||
+ QMetaObject::invokeMethod(self, "changed", Qt::QueuedConnection, Q_ARG(QString, qtify_name(key)));
|
||||
+}
|
||||
+
|
||||
+ukuiStyleConfSettings::ukuiStyleConfSettings(const QByteArray &schema_id)
|
||||
+{
|
||||
+ if (!ukuistyle_settings)
|
||||
+ ukuistyle_settings = kdk_conf2_new(schema_id, NULL);
|
||||
+
|
||||
+ signal_handler_id = kdk_conf2_connect_signal(ukuistyle_settings, "changed",
|
||||
+ (KCallBack)settingChanged, this);
|
||||
+}
|
||||
+
|
||||
+ukuiStyleConfSettings::~ukuiStyleConfSettings()
|
||||
+{
|
||||
+ if (ukuistyle_settings) {
|
||||
+ kdk_conf2_ksettings_destroy(ukuistyle_settings);
|
||||
+ ukuistyle_settings = NULL;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+QVariant ukuiStyleConfSettings::types_to_qvariant(const char *key,const char* value) const
|
||||
+{
|
||||
+ char *type = kdk_conf2_get_type(this->ukuistyle_settings, key);
|
||||
+ switch (*type) {
|
||||
+ case VARIANT_CLASS_BOOLEAN:
|
||||
+ return QVariant(value);
|
||||
+
|
||||
+ case VARIANT_CLASS_BYTE:
|
||||
+ return QVariant(QString(value));
|
||||
+
|
||||
+ case VARIANT_CLASS_INT16:
|
||||
+ return QVariant(QString(value).toShort());
|
||||
+
|
||||
+ case VARIANT_CLASS_UINT16:
|
||||
+ return QVariant(QString(value).toUShort());
|
||||
+
|
||||
+ case VARIANT_CLASS_INT32:
|
||||
+ return QVariant(QString(value).toInt());
|
||||
+
|
||||
+ case VARIANT_CLASS_UINT32:
|
||||
+ return QVariant(QString(value).toUInt());
|
||||
+
|
||||
+ case VARIANT_CLASS_INT64:
|
||||
+ return QVariant(QString(value).toLongLong());
|
||||
+
|
||||
+ case VARIANT_CLASS_UINT64:
|
||||
+ return QVariant(QString(value).toULongLong());
|
||||
+
|
||||
+ case VARIANT_CLASS_DOUBLE:
|
||||
+ return QVariant(QString(value).toDouble());
|
||||
+
|
||||
+ case VARIANT_CLASS_STRING:
|
||||
+ return QVariant(QString(value));
|
||||
+
|
||||
+ case VARIANT_CLASS_ARRAY:
|
||||
+// if (g_variant_is_of_type(value, G_VARIANT_TYPE_STRING_ARRAY)) {
|
||||
+// GVariantIter iter;
|
||||
+// QStringList list;
|
||||
+// const gchar *str;
|
||||
+
|
||||
+// g_variant_iter_init (&iter, value);
|
||||
+// while (g_variant_iter_next (&iter, "&s", &str))
|
||||
+// list.append (str);
|
||||
+
|
||||
+// return QVariant(list);
|
||||
+// } else if (g_variant_is_of_type(value, G_VARIANT_TYPE_BYTESTRING)) {
|
||||
+// return QVariant(QByteArray(g_variant_get_bytestring(value)));
|
||||
+// } else if (g_variant_is_of_type(value, G_VARIANT_TYPE("a{ss}"))) {
|
||||
+// GVariantIter iter;
|
||||
+// QMap<QString, QVariant> map;
|
||||
+// const gchar *key;
|
||||
+// const gchar *val;
|
||||
+
|
||||
+// g_variant_iter_init (&iter, value);
|
||||
+// while (g_variant_iter_next (&iter, "{&s&s}", &key, &val))
|
||||
+// map.insert(key, QVariant(val));
|
||||
+
|
||||
+// return map;
|
||||
+// }
|
||||
+
|
||||
+ // fall through
|
||||
+ default:
|
||||
+ g_assert_not_reached();
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+QVariant ukuiStyleConfSettings::get(const QString &key) const
|
||||
+{
|
||||
+ char *ckey = unqtify_name(key);
|
||||
+ char *value = kdk_conf2_get_value(ukuistyle_settings, ckey);
|
||||
+
|
||||
+ QVariant qvalue = types_to_qvariant(ckey, value);
|
||||
+
|
||||
+ g_free(value);
|
||||
+ g_free(ckey);
|
||||
+ return qvalue;
|
||||
+}
|
||||
+
|
||||
+void ukuiStyleConfSettings::set(const QString &key, const QVariant &value)
|
||||
+{
|
||||
+ if (!this->trySet(key, value))
|
||||
+ qWarning("unable to set key '%s' to value '%s'", key.toUtf8().constData(), value.toString().toUtf8().constData());
|
||||
+}
|
||||
+
|
||||
+bool ukuiStyleConfSettings::trySet(const QString &key, const QVariant &value)
|
||||
+{
|
||||
+ if (!ukuistyle_settings)
|
||||
+ return false;
|
||||
+
|
||||
+ char *ckey = unqtify_name(key);
|
||||
+ char *cvalue = unqtify_name(value.value<QString>());
|
||||
+ bool success = false;
|
||||
+
|
||||
+ success = kdk_conf2_set_value(ukuistyle_settings, ckey, cvalue);
|
||||
+ g_free(ckey);
|
||||
+ g_free(cvalue);
|
||||
+ return success;
|
||||
+}
|
||||
+
|
||||
+QStringList ukuiStyleConfSettings::keys() const
|
||||
+{
|
||||
+ QStringList list;
|
||||
+
|
||||
+ char **keys = kdk_conf2_list_keys(ukuistyle_settings);
|
||||
+ for (int i = 0; keys[i]; i++)
|
||||
+ list.append(qtify_name(keys[i]));
|
||||
+
|
||||
+ g_strfreev(keys);
|
||||
+
|
||||
+ return list;
|
||||
+}
|
||||
+
|
||||
+void ukuiStyleConfSettings::reset(const QString &qkey)
|
||||
+{
|
||||
+ if (!ukuistyle_settings)
|
||||
+ return;
|
||||
+
|
||||
+ char *key = unqtify_name(qkey);
|
||||
+ kdk_conf2_reset(ukuistyle_settings, key);
|
||||
+ g_free(key);
|
||||
+}
|
||||
+
|
||||
+bool ukuiStyleConfSettings::isSettingsAvailable(const QString &schema_id)
|
||||
+{
|
||||
+ char *schema = unqtify_name(schema_id);
|
||||
+ bool result = false;
|
||||
+ if (kdk_conf2_new(schema, NULL)) {
|
||||
+ result = true;
|
||||
+ }
|
||||
+
|
||||
+ g_free(schema);
|
||||
+ return result;
|
||||
+}
|
||||
diff --git a/libqt5-ukui-style/settings/ukui-style-conf-settings.h b/libqt5-ukui-style/settings/ukui-style-conf-settings.h
|
||||
new file mode 100644
|
||||
index 0000000..6a1db53
|
||||
--- /dev/null
|
||||
+++ b/libqt5-ukui-style/settings/ukui-style-conf-settings.h
|
||||
@@ -0,0 +1,87 @@
|
||||
+/*
|
||||
+ * Qt5-UKUI's Library
|
||||
+ *
|
||||
+ * Copyright (C) 2023, KylinSoft Co., Ltd.
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 3 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with this library. If not, see <https://www.gnu.org/licenses/>.
|
||||
+ *
|
||||
+ * Authors: xibowen <xibowen@kylinos.cn>
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+#ifndef UKUISTYLECONFSETTINGS_H
|
||||
+#define UKUISTYLECONFSETTINGS_H
|
||||
+
|
||||
+
|
||||
+#include <QObject>
|
||||
+#include <QVariant>
|
||||
+
|
||||
+typedef struct _KSettings KSettings;
|
||||
+
|
||||
+class ukuiStyleConfSettings : public QObject
|
||||
+{
|
||||
+ Q_OBJECT
|
||||
+public:
|
||||
+
|
||||
+ enum VariantClass {
|
||||
+ VARIANT_CLASS_BOOLEAN = 'b',
|
||||
+ VARIANT_CLASS_BYTE = 'y',
|
||||
+ VARIANT_CLASS_INT16 = 'n',
|
||||
+ VARIANT_CLASS_UINT16 = 'q',
|
||||
+ VARIANT_CLASS_INT32 = 'i',
|
||||
+ VARIANT_CLASS_UINT32 = 'u',
|
||||
+ VARIANT_CLASS_INT64 = 'x',
|
||||
+ VARIANT_CLASS_UINT64 = 't',
|
||||
+ VARIANT_CLASS_HANDLE = 'h',
|
||||
+ VARIANT_CLASS_DOUBLE = 'd',
|
||||
+ VARIANT_CLASS_STRING = 's',
|
||||
+ VARIANT_CLASS_OBJECT_PATH = 'o',
|
||||
+ VARIANT_CLASS_SIGNATURE = 'g',
|
||||
+ VARIANT_CLASS_VARIANT = 'v',
|
||||
+ VARIANT_CLASS_MAYBE = 'm',
|
||||
+ VARIANT_CLASS_ARRAY = 'a',
|
||||
+ VARIANT_CLASS_TUPLE = '(',
|
||||
+ VARIANT_CLASS_DICT_ENTRY = '{'
|
||||
+ };
|
||||
+
|
||||
+
|
||||
+ ukuiStyleConfSettings(const QByteArray &schema_id);
|
||||
+
|
||||
+ ~ukuiStyleConfSettings();
|
||||
+
|
||||
+ QVariant types_to_qvariant(const char *key, const char *value) const;
|
||||
+
|
||||
+ static ukuiStyleConfSettings *globalInstance();
|
||||
+
|
||||
+ QVariant get(const QString &key) const;
|
||||
+
|
||||
+ void set(const QString &key, const QVariant &value);
|
||||
+
|
||||
+ bool trySet(const QString &key, const QVariant &value);
|
||||
+
|
||||
+ QStringList keys() const;
|
||||
+
|
||||
+ void reset(const QString &key);
|
||||
+
|
||||
+ static bool isSettingsAvailable(const QString &schema_id);
|
||||
+
|
||||
+Q_SIGNALS:
|
||||
+ void changed(const QString &key);
|
||||
+
|
||||
+private:
|
||||
+ KSettings *ukuistyle_settings = NULL;
|
||||
+ long signal_handler_id;
|
||||
+};
|
||||
+
|
||||
+#endif // UKUISTYLECONFSETTINGS_H
|
||||
diff --git a/libqt5-ukui-style/settings/ukui-style-settings.h b/libqt5-ukui-style/settings/ukui-style-settings.h
|
||||
index 861c855..a11f075 100644
|
||||
--- a/libqt5-ukui-style/settings/ukui-style-settings.h
|
||||
+++ b/libqt5-ukui-style/settings/ukui-style-settings.h
|
||||
@@ -26,6 +26,9 @@
|
||||
#include "libqt5-ukui-style_global.h"
|
||||
#include <QGSettings>
|
||||
|
||||
+//Fix me:after so
|
||||
+//#include "ukui-style-conf-settings.h"
|
||||
+
|
||||
/*!
|
||||
* \brief The UKUIStyleSettings class
|
||||
* \details
|
||||
diff --git a/qt5-ukui-filedialog/qt5-ukui-filedialog.pro b/qt5-ukui-filedialog/qt5-ukui-filedialog.pro
|
||||
index 65da40b..4ece318 100644
|
||||
--- a/qt5-ukui-filedialog/qt5-ukui-filedialog.pro
|
||||
+++ b/qt5-ukui-filedialog/qt5-ukui-filedialog.pro
|
||||
@@ -15,7 +15,7 @@ TARGET = qt5-ukui-filedialog
|
||||
TEMPLATE = lib
|
||||
CONFIG += plugin
|
||||
CONFIG += c++11 link_pkgconfig lrelease
|
||||
-PKGCONFIG += gsettings-qt peony kysdk-waylandhelper
|
||||
+PKGCONFIG += gsettings-qt peony kysdk-waylandhelper kysdk-conf2
|
||||
LIBS += -lX11
|
||||
|
||||
include(../libqt5-ukui-style/libqt5-ukui-style.pri)
|
||||
diff --git a/qt5-ukui-platformtheme/qt5-ukui-platformtheme.pro b/qt5-ukui-platformtheme/qt5-ukui-platformtheme.pro
|
||||
index c47c5cd..9e597ee 100644
|
||||
--- a/qt5-ukui-platformtheme/qt5-ukui-platformtheme.pro
|
||||
+++ b/qt5-ukui-platformtheme/qt5-ukui-platformtheme.pro
|
||||
@@ -15,7 +15,7 @@ TARGET = qt5-ukui-platformtheme
|
||||
TEMPLATE = lib
|
||||
CONFIG += plugin
|
||||
CONFIG += c++11 link_pkgconfig lrelease
|
||||
-PKGCONFIG += gsettings-qt Qt5XdgIconLoader kysdk-waylandhelper fontconfig freetype2 gio-2.0
|
||||
+PKGCONFIG += gsettings-qt Qt5XdgIconLoader kysdk-waylandhelper fontconfig freetype2 gio-2.0 kysdk-conf2
|
||||
LIBS += -lX11 -lfontconfig -lfreetype
|
||||
|
||||
include(../libqt5-ukui-style/libqt5-ukui-style.pri)
|
||||
diff --git a/test/mps-style-application/mps-style-application.pro b/test/mps-style-application/mps-style-application.pro
|
||||
index ccce17a..2eef99d 100644
|
||||
--- a/test/mps-style-application/mps-style-application.pro
|
||||
+++ b/test/mps-style-application/mps-style-application.pro
|
||||
@@ -23,7 +23,7 @@ DEFINES += QT_DEPRECATED_WARNINGS
|
||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||
|
||||
CONFIG += plugin c++11 link_pkgconfig
|
||||
-PKGCONFIG += gsettings-qt
|
||||
+PKGCONFIG += gsettings-qt gio-2.0 kysdk-conf2
|
||||
|
||||
include(../../libqt5-ukui-style/libqt5-ukui-style.pri)
|
||||
|
||||
diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp
|
||||
index 3dad245..8288cd1 100644
|
||||
--- a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp
|
||||
+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp
|
||||
@@ -3969,7 +3969,7 @@ void UKUIConfigStyleParameters::initConfigMenuParameters(bool isDark, const QSty
|
||||
int itemradius = (widget && widget->property("normalRadius").isValid()) ?
|
||||
widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius;
|
||||
// QPixmap framePixmap(option->rect.size());
|
||||
- UKUIColorTheme::MenuColorCfg menuColorCfg = readCfg()->menuColorCfg(C_Menu_Default);
|
||||
+ UKUIColorTheme::MenuColorCfg menuColorCfg = readCfg()->menuColorCfg(option->palette, C_Menu_Default);
|
||||
|
||||
QPen menuBackgroundPen = QPen(menuColorCfg.menuBackgroundPen, (menuColorCfg.menuBackgroundPen.alpha() == 0 ||
|
||||
menuColorCfg.menuBackgroundPen == Qt::NoPen ) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);
|
||||
diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp
|
||||
index cb73571..3ac9ced 100644
|
||||
--- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp
|
||||
+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp
|
||||
@@ -4013,7 +4013,6 @@ void UKUIConfigStyle::drawComplexControl(QStyle::ComplexControl control, const Q
|
||||
painter->setPen(width <= 0 ? Qt::NoPen : sp->m_SpinBoxParameters.spinBoxUpClickPen);
|
||||
painter->setBrush(sp->m_SpinBoxParameters.spinBoxUpClickBrush);
|
||||
} else {
|
||||
- qDebug() << "focus." << focus;
|
||||
if (focus) {
|
||||
upOption.state |= State_MouseOver;
|
||||
int width = sp->m_SpinBoxParameters.spinBoxUpFocusHoverPen.width();
|
||||
diff --git a/ukui-styles/readconfig.cpp b/ukui-styles/readconfig.cpp
|
||||
index 0526356..31c3d8f 100644
|
||||
--- a/ukui-styles/readconfig.cpp
|
||||
+++ b/ukui-styles/readconfig.cpp
|
||||
@@ -1083,11 +1083,12 @@ UKUIColorTheme::TabWidgetColorCfg ReadThemeConfig::tabWidgetColorCfg(const QPale
|
||||
return m_tabWidgetColorCfg;
|
||||
}
|
||||
|
||||
-UKUIColorTheme::MenuColorCfg ReadThemeConfig::menuColorCfg(QString property)
|
||||
+UKUIColorTheme::MenuColorCfg ReadThemeConfig::menuColorCfg(const QPalette palette, QString property)
|
||||
{
|
||||
if(!m_loadConfig)
|
||||
return m_menuColorCfg;
|
||||
|
||||
+ m_readConfig->widgetPalette(palette);
|
||||
m_readConfig->getColorValue(m_menuColorCfg.menuBackgroundBrush, m_theme, UKUIMenu, property, C_Menu_MenuBackgroundBrush);
|
||||
m_readConfig->getColorValue(m_menuColorCfg.menuBackgroundPen, m_theme, UKUIMenu, property, C_Menu_MenuBackgroundPen);
|
||||
m_readConfig->getColorValue(m_menuColorCfg.menuItemSelectBrush, m_theme, UKUIMenu, property, C_Menu_MenuItemSelectBrush);
|
||||
diff --git a/ukui-styles/readconfig.h b/ukui-styles/readconfig.h
|
||||
index ded39fc..ba53cc3 100644
|
||||
--- a/ukui-styles/readconfig.h
|
||||
+++ b/ukui-styles/readconfig.h
|
||||
@@ -160,7 +160,7 @@ public:
|
||||
|
||||
UKUIColorTheme::TabWidgetColorCfg tabWidgetColorCfg(const QPalette palette, QString property = C_TabWidget_Default);
|
||||
|
||||
- UKUIColorTheme::MenuColorCfg menuColorCfg(QString property = C_Menu_Default);
|
||||
+ UKUIColorTheme::MenuColorCfg menuColorCfg(const QPalette palette, QString property = C_Menu_Default);
|
||||
|
||||
bool setRadius(QString key, int r);
|
||||
|
||||
diff --git a/ukui-styles/ukui-styles.pro b/ukui-styles/ukui-styles.pro
|
||||
index 2275336..b8a1a49 100644
|
||||
--- a/ukui-styles/ukui-styles.pro
|
||||
+++ b/ukui-styles/ukui-styles.pro
|
||||
@@ -9,7 +9,7 @@ QT += widgets widgets-private KWindowSystem gui gui-private x11extras dbus
|
||||
TARGET = qt5-style-ukui
|
||||
TEMPLATE = lib
|
||||
CONFIG += plugin c++11 link_pkgconfig
|
||||
-PKGCONFIG += gsettings-qt
|
||||
+PKGCONFIG += gsettings-qt gio-2.0 kysdk-conf2
|
||||
LIBS += -lxcb
|
||||
|
||||
include(../libqt5-ukui-style/libqt5-ukui-style.pri)
|
|
@ -11,3 +11,4 @@
|
|||
0011-Update-changelog-4.1.0.0-0k12.patch
|
||||
0012-rebuild-for-qt-5.15.10.patch
|
||||
0013-Update-changelog-4.1.0.0-0k14.patch
|
||||
0014-Update-changelog-4.1.0.0-0k15.patch
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
usr/lib/*/qt5/plugins/platformthemes/*.so
|
||||
qt5-ukui-filedialog/.qm/* /usr/share/qt5-ukui-platformtheme
|
||||
qt5-ukui-platformtheme/.qm/* /usr/share/qt5-ukui-platformtheme
|
||||
usr/lib/*/qt5/plugins/platformthemes/*.so
|
||||
|
|
Loading…
Reference in New Issue