summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lxqt-base/lxqt-config/files/revert-2aff948ea19508317c185d87bc5f5e20fe64a30f.patch394
-rw-r--r--lxqt-base/lxqt-config/lxqt-config-2.1.0-r1.ebuild4
2 files changed, 397 insertions, 1 deletions
diff --git a/lxqt-base/lxqt-config/files/revert-2aff948ea19508317c185d87bc5f5e20fe64a30f.patch b/lxqt-base/lxqt-config/files/revert-2aff948ea19508317c185d87bc5f5e20fe64a30f.patch
new file mode 100644
index 00000000..f49e98a2
--- /dev/null
+++ b/lxqt-base/lxqt-config/files/revert-2aff948ea19508317c185d87bc5f5e20fe64a30f.patch
@@ -0,0 +1,394 @@
+diff '--color=auto' -Nur a/lxqt-config-appearance/lxqtthemeconfig.cpp b/lxqt-config-appearance/lxqtthemeconfig.cpp
+--- a/lxqt-config-appearance/lxqtthemeconfig.cpp 2024-11-05 05:22:05.000000000 +0000
++++ b/lxqt-config-appearance/lxqtthemeconfig.cpp 2024-11-08 18:39:06.790390985 +0000
+@@ -35,7 +35,6 @@
+ #include <QMenu>
+ #include <QDesktopServices>
+ #include <QUrl>
+-#include <QDir>
+
+ #include <XdgDirs>
+
+@@ -61,11 +60,10 @@
+ }
+ };
+
+-LXQtThemeConfig::LXQtThemeConfig(LXQt::Settings *settings, StyleConfig *stylePage, QWidget *parent) :
++LXQtThemeConfig::LXQtThemeConfig(LXQt::Settings *settings, QWidget *parent) :
+ QWidget(parent),
+ ui(new Ui::LXQtThemeConfig),
+- mSettings(settings),
+- mStylePage(stylePage)
++ mSettings(settings)
+ {
+ ui->setupUi(this);
+ {
+@@ -96,9 +94,8 @@
+
+ initControls();
+
+- connect(ui->lxqtThemeList, &QTreeWidget::currentItemChanged, this, &LXQtThemeConfig::onCurrentItemChanged);
++ connect(ui->lxqtThemeList, &QTreeWidget::currentItemChanged, this, &LXQtThemeConfig::settingsChanged);
+ connect(ui->wallpaperOverride, &QAbstractButton::clicked, this, &LXQtThemeConfig::settingsChanged);
+- connect(ui->paletteOverride, &QAbstractButton::clicked, this, &LXQtThemeConfig::onPaletteOverrideChanged);
+
+ connect(ui->lxqtThemeList, &QTreeWidget::itemDoubleClicked, this, &LXQtThemeConfig::doubleClicked);
+ connect(ui->lxqtThemeList, &QWidget::customContextMenuRequested, this, &LXQtThemeConfig::contextMenu);
+@@ -125,9 +122,6 @@
+ ++it;
+ }
+
+- ui->wallpaperOverride->setChecked(mSettings->value(QStringLiteral("wallpaper_override")).toBool());
+- ui->paletteOverride->setChecked(mSettings->value(QStringLiteral("palette_override")).toBool());
+-
+ update();
+ }
+
+@@ -155,12 +149,6 @@
+ }
+ }
+ }
+-
+- if(mSettings->value(QStringLiteral("wallpaper_override")) != ui->wallpaperOverride->isChecked())
+- mSettings->setValue(QStringLiteral("wallpaper_override"), ui->wallpaperOverride->isChecked());
+-
+- if(mSettings->value(QStringLiteral("palette_override")) != ui->paletteOverride->isChecked())
+- mSettings->setValue(QStringLiteral("palette_override"), ui->paletteOverride->isChecked());
+ }
+
+ void LXQtThemeConfig::doubleClicked(QTreeWidgetItem *item, int /*column*/)
+@@ -188,43 +176,3 @@
+ });
+ menu.exec(ui->lxqtThemeList->viewport()->mapToGlobal(p));
+ }
+-
+-void LXQtThemeConfig::loadThemePalette()
+-{
+- QTreeWidgetItem* current = ui->lxqtThemeList->currentItem();
+- if (!ui->paletteOverride->isChecked() || !mStylePage || !current)
+- return;
+- QString themeName = current->data(0, Qt::UserRole).toString();
+- if (themeName.isEmpty())
+- return;
+- themeName[0] = themeName[0].toTitleCase(); // palette names should be as they appear in GUI
+- auto paths = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation);
+- paths.removeDuplicates();
+- for (const auto &path : std::as_const(paths))
+- {
+- QDir dir(path + QLatin1String("/lxqt/palettes"));
+- if (dir.exists())
+- {
+- if (dir.exists(themeName))
+- {
+- const QString palettePath = path + QStringLiteral("/lxqt/palettes/") + themeName;
+- mStylePage->loadPaletteFile(palettePath);
+- break;
+- }
+- }
+- }
+-}
+-
+-void LXQtThemeConfig::onPaletteOverrideChanged(bool checked)
+-{
+- emit settingsChanged();
+- if (checked)
+- loadThemePalette();
+-}
+-
+-void LXQtThemeConfig::onCurrentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)
+-{
+- emit settingsChanged();
+- if (ui->paletteOverride->isChecked())
+- loadThemePalette();
+-}
+diff '--color=auto' -Nur a/lxqt-config-appearance/lxqtthemeconfig.h b/lxqt-config-appearance/lxqtthemeconfig.h
+--- a/lxqt-config-appearance/lxqtthemeconfig.h 2024-11-05 05:22:05.000000000 +0000
++++ b/lxqt-config-appearance/lxqtthemeconfig.h 2024-11-08 18:39:06.791390985 +0000
+@@ -30,7 +30,6 @@
+
+ #include <QWidget>
+ #include <LXQt/Settings>
+-#include "styleconfig.h"
+
+ class QTreeWidgetItem;
+
+@@ -43,7 +42,7 @@
+ Q_OBJECT
+
+ public:
+- explicit LXQtThemeConfig(LXQt::Settings *settings, StyleConfig *stylePage, QWidget *parent = nullptr);
++ explicit LXQtThemeConfig(LXQt::Settings *settings, QWidget *parent = nullptr);
+ ~LXQtThemeConfig();
+
+ void applyLxqtTheme();
+@@ -57,15 +56,10 @@
+ private slots:
+ void doubleClicked(QTreeWidgetItem *item, int column);
+ void contextMenu(const QPoint& p);
+- void onPaletteOverrideChanged(bool checked);
+- void onCurrentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*);
+
+ private:
+- void loadThemePalette();
+-
+ Ui::LXQtThemeConfig *ui;
+ LXQt::Settings *mSettings;
+- StyleConfig *mStylePage;
+ };
+
+ #endif // LXQTTHEMECONFIG_H
+diff '--color=auto' -Nur a/lxqt-config-appearance/lxqtthemeconfig.ui b/lxqt-config-appearance/lxqtthemeconfig.ui
+--- a/lxqt-config-appearance/lxqtthemeconfig.ui 2024-11-05 05:22:05.000000000 +0000
++++ b/lxqt-config-appearance/lxqtthemeconfig.ui 2024-11-08 18:39:06.791390985 +0000
+@@ -58,13 +58,6 @@
+ </property>
+ </widget>
+ </item>
+- <item>
+- <widget class="QCheckBox" name="paletteOverride">
+- <property name="text">
+- <string>Use palette provided by theme</string>
+- </property>
+- </widget>
+- </item>
+ </layout>
+ </widget>
+ <resources/>
+diff '--color=auto' -Nur a/lxqt-config-appearance/main.cpp b/lxqt-config-appearance/main.cpp
+--- a/lxqt-config-appearance/main.cpp 2024-11-05 05:22:05.000000000 +0000
++++ b/lxqt-config-appearance/main.cpp 2024-11-08 18:39:06.791390985 +0000
+@@ -88,7 +88,7 @@
+ QObject::connect(iconPage, &IconThemeConfig::updateOtherSettings, configOtherToolKits, &ConfigOtherToolKits::setConfig);
+
+ /*** LXQt Theme ***/
+- LXQtThemeConfig* themePage = new LXQtThemeConfig(settings, stylePage, dialog);
++ LXQtThemeConfig* themePage = new LXQtThemeConfig(settings, dialog);
+ dialog->addPage(themePage, QObject::tr("LXQt Theme"), QStringList() << QStringLiteral("preferences-desktop-color") << QStringLiteral("preferences-desktop"));
+ QObject::connect(dialog, &LXQt::ConfigDialog::reset, themePage, &LXQtThemeConfig::initControls);
+ QObject::connect(themePage, &LXQtThemeConfig::settingsChanged, dialog, [dialog] {
+diff '--color=auto' -Nur a/lxqt-config-appearance/styleconfig.cpp b/lxqt-config-appearance/styleconfig.cpp
+--- a/lxqt-config-appearance/styleconfig.cpp 2024-11-05 05:22:05.000000000 +0000
++++ b/lxqt-config-appearance/styleconfig.cpp 2024-11-08 18:39:06.791390985 +0000
+@@ -485,70 +485,65 @@
+ dialog.setQuestion(tr("Do you really want to remove selected palette(s)?\nRoot palettes will remain intact if existing."));
+
+ if (dialog.exec() == QDialog::Accepted)
+- {
+- loadPaletteFile(dialog.currentPalette());
+- }
+-}
++ { // set color labels
++ auto paletteFile = dialog.currentPalette();
++ if (paletteFile.isEmpty())
++ return;
++ QSettings settings(paletteFile, QSettings::IniFormat);
++ settings.beginGroup(QStringLiteral("Palette"));
++
++ QColor color;
++ color = QColor::fromString(settings.value(QStringLiteral("window_color")).toString());
++ if (!color.isValid())
++ color = QGuiApplication::palette().color(QPalette::Active,QPalette::Window);
++ ui->winColorLabel->setColor(color, true);
++
++ color = QColor::fromString(settings.value(QStringLiteral("base_color")).toString());
++ if (!color.isValid())
++ color = QGuiApplication::palette().color(QPalette::Active,QPalette::Base);
++ ui->baseColorLabel->setColor(color, true);
++
++ color = QColor::fromString(settings.value(QStringLiteral("highlight_color")).toString());
++ if (!color.isValid())
++ color = QGuiApplication::palette().color(QPalette::Active,QPalette::Highlight);
++ ui->highlightColorLabel->setColor(color, true);
++
++ color = QColor::fromString(settings.value(QStringLiteral("window_text_color")).toString());
++ if (!color.isValid())
++ color = QGuiApplication::palette().color(QPalette::Active,QPalette::WindowText);
++ ui->windowTextColorLabel->setColor(color, true);
++
++ color = QColor::fromString(settings.value(QStringLiteral("text_color")).toString());
++ if (!color.isValid())
++ color = QGuiApplication::palette().color(QPalette::Active,QPalette::Text);
++ ui->viewTextColorLabel->setColor(color, true);
++
++ color = QColor::fromString(settings.value(QStringLiteral("highlighted_text_color")).toString());
++ if (!color.isValid())
++ color = QGuiApplication::palette().color(QPalette::Active,QPalette::HighlightedText);
++ ui->highlightedTextColorLabel->setColor(color, true);
++
++ color = QColor::fromString(settings.value(QStringLiteral("link_color")).toString());
++ if (!color.isValid())
++ color = QGuiApplication::palette().color(QPalette::Active,QPalette::Link);
++ ui->linkColorLabel->setColor(color, true);
++
++ color = QColor::fromString(settings.value(QStringLiteral("link_visited_color")).toString());
++ if (!color.isValid())
++ color = QGuiApplication::palette().color(QPalette::Active,QPalette::LinkVisited);
++ ui->linkVisitedColorLabel->setColor(color, true);
++
++ // tooltips use the Inactive color group
++ color = QColor::fromString(settings.value(QStringLiteral("tooltip_base_color")).toString());
++ if (!color.isValid())
++ color = QGuiApplication::palette().color(QPalette::Inactive,QPalette::ToolTipBase);
++ ui->tooltipColorLabel->setColor(color, true);
++
++ color = QColor::fromString(settings.value(QStringLiteral("tooltip_text_color")).toString());
++ if (!color.isValid())
++ color = QGuiApplication::palette().color(QPalette::Inactive,QPalette::ToolTipText);
++ ui->tooltipTextColorLabel->setColor(color, true);
+
+-void StyleConfig::loadPaletteFile(const QString& paletteFile)
+-{ // set color labels
+- if (paletteFile.isEmpty())
+- return;
+-
+- QSettings settings(paletteFile, QSettings::IniFormat);
+- settings.beginGroup(QStringLiteral("Palette"));
+-
+- QColor color;
+- color = QColor::fromString(settings.value(QStringLiteral("window_color")).toString());
+- if (!color.isValid())
+- color = QGuiApplication::palette().color(QPalette::Active,QPalette::Window);
+- ui->winColorLabel->setColor(color, true);
+-
+- color = QColor::fromString(settings.value(QStringLiteral("base_color")).toString());
+- if (!color.isValid())
+- color = QGuiApplication::palette().color(QPalette::Active,QPalette::Base);
+- ui->baseColorLabel->setColor(color, true);
+-
+- color = QColor::fromString(settings.value(QStringLiteral("highlight_color")).toString());
+- if (!color.isValid())
+- color = QGuiApplication::palette().color(QPalette::Active,QPalette::Highlight);
+- ui->highlightColorLabel->setColor(color, true);
+-
+- color = QColor::fromString(settings.value(QStringLiteral("window_text_color")).toString());
+- if (!color.isValid())
+- color = QGuiApplication::palette().color(QPalette::Active,QPalette::WindowText);
+- ui->windowTextColorLabel->setColor(color, true);
+-
+- color = QColor::fromString(settings.value(QStringLiteral("text_color")).toString());
+- if (!color.isValid())
+- color = QGuiApplication::palette().color(QPalette::Active,QPalette::Text);
+- ui->viewTextColorLabel->setColor(color, true);
+-
+- color = QColor::fromString(settings.value(QStringLiteral("highlighted_text_color")).toString());
+- if (!color.isValid())
+- color = QGuiApplication::palette().color(QPalette::Active,QPalette::HighlightedText);
+- ui->highlightedTextColorLabel->setColor(color, true);
+-
+- color = QColor::fromString(settings.value(QStringLiteral("link_color")).toString());
+- if (!color.isValid())
+- color = QGuiApplication::palette().color(QPalette::Active,QPalette::Link);
+- ui->linkColorLabel->setColor(color, true);
+-
+- color = QColor::fromString(settings.value(QStringLiteral("link_visited_color")).toString());
+- if (!color.isValid())
+- color = QGuiApplication::palette().color(QPalette::Active,QPalette::LinkVisited);
+- ui->linkVisitedColorLabel->setColor(color, true);
+-
+- // tooltips use the Inactive color group
+- color = QColor::fromString(settings.value(QStringLiteral("tooltip_base_color")).toString());
+- if (!color.isValid())
+- color = QGuiApplication::palette().color(QPalette::Inactive,QPalette::ToolTipBase);
+- ui->tooltipColorLabel->setColor(color, true);
+-
+- color = QColor::fromString(settings.value(QStringLiteral("tooltip_text_color")).toString());
+- if (!color.isValid())
+- color = QGuiApplication::palette().color(QPalette::Inactive,QPalette::ToolTipText);
+- ui->tooltipTextColorLabel->setColor(color, true);
+-
+- settings.endGroup();
++ settings.endGroup();
++ }
+ }
+diff '--color=auto' -Nur a/lxqt-config-appearance/styleconfig.h b/lxqt-config-appearance/styleconfig.h
+--- a/lxqt-config-appearance/styleconfig.h 2024-11-05 05:22:05.000000000 +0000
++++ b/lxqt-config-appearance/styleconfig.h 2024-11-08 18:39:06.791390985 +0000
+@@ -47,7 +47,6 @@
+ ~StyleConfig();
+
+ void applyStyle();
+- void loadPaletteFile(const QString& paletteFile);
+
+ public slots:
+ void initControls();
+diff '--color=auto' -Nur a/lxqt-config-appearance/styleconfig.ui b/lxqt-config-appearance/styleconfig.ui
+--- a/lxqt-config-appearance/styleconfig.ui 2024-11-05 05:22:05.000000000 +0000
++++ b/lxqt-config-appearance/styleconfig.ui 2024-11-08 18:39:06.791390985 +0000
+@@ -127,28 +127,28 @@
+ <widget class="ColorLabel" name="highlightColorLabel"/>
+ </item>
+ <item row="3" column="0">
+- <widget class="QLabel" name="label_3">
++ <widget class="QLabel" name="label_13">
+ <property name="text">
+- <string>Tooltip:</string>
++ <string>Link:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+- <widget class="ColorLabel" name="tooltipColorLabel">
+- <property name="text">
+- <string/>
+- </property>
+- </widget>
++ <widget class="ColorLabel" name="linkColorLabel"/>
+ </item>
+ <item row="4" column="0">
+- <widget class="QLabel" name="label_13">
++ <widget class="QLabel" name="label_3">
+ <property name="text">
+- <string>Link:</string>
++ <string>Tooltip:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1">
+- <widget class="ColorLabel" name="linkColorLabel"/>
++ <widget class="ColorLabel" name="tooltipColorLabel">
++ <property name="text">
++ <string/>
++ </property>
++ </widget>
+ </item>
+ </layout>
+ </item>
+@@ -191,28 +191,28 @@
+ <widget class="ColorLabel" name="highlightedTextColorLabel"/>
+ </item>
+ <item row="3" column="0">
+- <widget class="QLabel" name="label_4">
++ <widget class="QLabel" name="label_14">
+ <property name="text">
+- <string>Tooltip Text:</string>
++ <string>Visited Link:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+- <widget class="ColorLabel" name="tooltipTextColorLabel">
+- <property name="text">
+- <string/>
+- </property>
+- </widget>
++ <widget class="ColorLabel" name="linkVisitedColorLabel"/>
+ </item>
+ <item row="4" column="0">
+- <widget class="QLabel" name="label_14">
++ <widget class="QLabel" name="label_4">
+ <property name="text">
+- <string>Visited Link:</string>
++ <string>Tooltip Text:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1">
+- <widget class="ColorLabel" name="linkVisitedColorLabel"/>
++ <widget class="ColorLabel" name="tooltipTextColorLabel">
++ <property name="text">
++ <string/>
++ </property>
++ </widget>
+ </item>
+ </layout>
+ </item>
diff --git a/lxqt-base/lxqt-config/lxqt-config-2.1.0-r1.ebuild b/lxqt-base/lxqt-config/lxqt-config-2.1.0-r1.ebuild
index 2cb1e827..8b21bad4 100644
--- a/lxqt-base/lxqt-config/lxqt-config-2.1.0-r1.ebuild
+++ b/lxqt-base/lxqt-config/lxqt-config-2.1.0-r1.ebuild
@@ -47,7 +47,9 @@ DEPEND="
"
RDEPEND="${DEPEND}"
-PATCHES=( "${FILESDIR}"/"${PN}"-qt5ct.patch )
+PATCHES=(
+ "${FILESDIR}"/revert-2aff948ea19508317c185d87bc5f5e20fe64a30f.patch
+ "${FILESDIR}"/"${PN}"-qt5ct.patch )
src_configure() {
local mycmakeargs=(