summaryrefslogtreecommitdiff
path: root/lxqt-base/lxqt-config/files/lxqt-config-qt5ct.patch
blob: 7b6dba8b1a68662fc95414b48d301fdd00ec0f52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
diff '--color=auto' -Nur a/lxqt-config-appearance/main.cpp b/lxqt-config-appearance/main.cpp
--- a/lxqt-config-appearance/main.cpp	2024-04-17 12:00:51.000000000 +0100
+++ b/lxqt-config-appearance/main.cpp	2024-09-30 03:31:04.883188155 +0100
@@ -33,12 +33,8 @@
 #include <QMessageBox>
 #include <QGuiApplication>
 
-#include "iconthemeconfig.h"
 #include "lxqtthemeconfig.h"
-#include "styleconfig.h"
-#include "fontsconfig.h"
 #include "configothertoolkits.h"
-#include "gtkconfig.h"
 
 #include "../liblxqt-config-cursor/selectwnd.h"
 
@@ -69,24 +65,6 @@
 
     QSettings& qtSettings = *settings; // use lxqt config file for Qt settings in Qt5.
 
-    /*** Widget Style ***/
-    StyleConfig* stylePage = new StyleConfig(settings, &qtSettings, dialog);
-    dialog->addPage(stylePage, QObject::tr("Widget Style"), QStringList() << QStringLiteral("preferences-desktop-theme") << QStringLiteral("preferences-desktop"));
-    QObject::connect(dialog, &LXQt::ConfigDialog::reset, stylePage, &StyleConfig::initControls);
-    QObject::connect(stylePage, &StyleConfig::settingsChanged, dialog, [dialog] {
-        dialog->enableButton(QDialogButtonBox::Apply, true); // enable Apply button when something is changed
-    });
-    QObject::connect(stylePage, &StyleConfig::updateOtherSettings, configOtherToolKits, &ConfigOtherToolKits::setConfig);
-
-    /*** Icon Theme ***/
-    IconThemeConfig* iconPage = new IconThemeConfig(settings, dialog);
-    dialog->addPage(iconPage, QObject::tr("Icons Theme"), QStringList() << QStringLiteral("preferences-desktop-icons") << QStringLiteral("preferences-desktop"));
-    QObject::connect(dialog, &LXQt::ConfigDialog::reset, iconPage, &IconThemeConfig::initControls);
-    QObject::connect(iconPage, &IconThemeConfig::settingsChanged, dialog, [dialog] {
-        dialog->enableButton(QDialogButtonBox::Apply, true);
-    });
-    QObject::connect(iconPage, &IconThemeConfig::updateOtherSettings, configOtherToolKits, &ConfigOtherToolKits::setConfig);
-
     /*** LXQt Theme ***/
     LXQtThemeConfig* themePage = new LXQtThemeConfig(settings, dialog);
     dialog->addPage(themePage, QObject::tr("LXQt Theme"), QStringList() << QStringLiteral("preferences-desktop-color") << QStringLiteral("preferences-desktop"));
@@ -95,15 +73,6 @@
         dialog->enableButton(QDialogButtonBox::Apply, true);
     });
 
-    /*** Font ***/
-    FontsConfig* fontsPage = new FontsConfig(settings, &qtSettings, dialog);
-    dialog->addPage(fontsPage, QObject::tr("Font"), QStringList() << QStringLiteral("preferences-desktop-font") << QStringLiteral("preferences-desktop"));
-    QObject::connect(dialog, &LXQt::ConfigDialog::reset, fontsPage, &FontsConfig::initControls);
-    QObject::connect(fontsPage, &FontsConfig::updateOtherSettings, configOtherToolKits, &ConfigOtherToolKits::setConfig);
-    QObject::connect(fontsPage, &FontsConfig::settingsChanged, dialog, [dialog] {
-        dialog->enableButton(QDialogButtonBox::Apply, true);
-    });
-
     /*** Cursor Theme ***/
     SelectWnd* cursorPage = new SelectWnd(sessionSettings, dialog);
     cursorPage->setCurrent();
@@ -112,25 +81,13 @@
             dialog->enableButton(QDialogButtonBox::Apply, true);
             });
 
-    /*** GTK Theme ***/
-    GTKConfig* GTKPage = new GTKConfig(&mConfigAppearanceSettings, configOtherToolKits, dialog);
-    dialog->addPage(GTKPage, QObject::tr("GTK Style"), QStringList() << QStringLiteral("gtk-preferences") << QStringLiteral("preferences-desktop"));
-    QObject::connect(dialog, &LXQt::ConfigDialog::reset, GTKPage, &GTKConfig::initControls);
-    QObject::connect(GTKPage, &GTKConfig::settingsChanged, dialog, [dialog] {
-        dialog->enableButton(QDialogButtonBox::Apply, true);
-    });
-
     // apply all changes on clicking Apply
     QObject::connect(dialog, &LXQt::ConfigDialog::clicked, [=] (QDialogButtonBox::StandardButton btn) {
         if (btn == QDialogButtonBox::Apply)
         {
             // FIXME: Update cursor style on Qt apps on wayland and GTK on X11.
-            iconPage->applyIconTheme();
             themePage->applyLxqtTheme();
-            fontsPage->updateQtFont();
             cursorPage->applyCusorTheme();
-            GTKPage->applyGTKStyle();
-            stylePage->applyStyle(); // Cursor and font have to be set before style
             // disable Apply button after changes are applied
             dialog->enableButton(btn, false);
         }