Compare commits

..

No commits in common. "da8184d511ba9e1db381aebcd9d2eb0f6cdc94cd" and "d9da7ba361f04cb6a58139a8ecf9625bf14218d0" have entirely different histories.

4 changed files with 116 additions and 10 deletions

8
debian/changelog vendored
View File

@ -1,13 +1,9 @@
lxqt-config (1.2.0-0ubuntu1) lunar; urgency=medium
lxqt-config (1.2.0-0ubuntu1) UNRELEASED; urgency=medium
* New upstream version.
* Fix the watch file, for real this time.
* Lubuntuify the package slightly, to make debhelper happy.
* Bump Standards-version, no changes needed.
* Bump build dependencies in debian/control.
* Drop reverse-applicable patch.
-- Simon Quigley <tsimonq2@ubuntu.com> Fri, 18 Nov 2022 17:09:36 -0600
-- Simon Quigley <tsimonq2@ubuntu.com> Fri, 18 Nov 2022 14:43:44 -0600
lxqt-config (1.1.0-0ubuntu2) kinetic; urgency=medium

8
debian/control vendored
View File

@ -7,7 +7,7 @@ Priority: optional
Build-Depends: debhelper-compat (= 13),
libkf5screen-dev,
libkf5windowsystem-dev,
liblxqt1-dev (>= 1.2.0),
liblxqt1-dev (>= 1.1.0),
libqt5svg5-dev,
libqt5x11extras5-dev,
libx11-dev,
@ -18,9 +18,9 @@ Build-Depends: debhelper-compat (= 13),
qtbase5-private-dev,
xserver-xorg-input-libinput-dev,
zlib1g-dev
Standards-Version: 4.6.1
Vcs-Browser: https://git.lubuntu.me/Lubuntu/lxqt-config-packaging
Vcs-Git: https://git.lubuntu.me/Lubuntu/lxqt-config-packaging.git
Standards-Version: 4.5.1
Vcs-Browser: https://phab.lubuntu.me/source/lxqt-config/
Vcs-Git: https://phab.lubuntu.me/source/lxqt-config.git
XS-Debian-Vcs-Browser: https://salsa.debian.org/lxqt-team/lxqt-config
XS-Debian-Vcs-Git: https://salsa.debian.org/lxqt-team/lxqt-config.git
Homepage: https://github.com/lxqt/lxqt-config

1
debian/patches/series vendored Normal file
View File

@ -0,0 +1 @@
theme-list-enhancements.patch

View File

@ -0,0 +1,109 @@
From ccc2ede1557523ed396e488f705132f187ab750f Mon Sep 17 00:00:00 2001
From: tsujan <tsujan2000@gmail.com>
Date: Mon, 16 May 2022 19:05:49 +0430
Subject: [PATCH] Small enhancement to theme list in appearance config dialog
(#854)
* Small enhancement to theme list in appearance config dialog
Themes are always sorted alphabetically, user themes are distinguished, and theme folders can be opened by double clicking or by using context menus.
Closes https://github.com/lxqt/lxqt-config/issues/852
* Don't use `WhatsThisRole` for theme path
`WhatsThisRole` might be needed later for another purpose, and finding the theme path directly has no real cost.
---
lxqt-config-appearance/lxqtthemeconfig.cpp | 40 ++++++++++++++++++++++
lxqt-config-appearance/lxqtthemeconfig.h | 4 +++
2 files changed, 44 insertions(+)
diff --git a/lxqt-config-appearance/lxqtthemeconfig.cpp b/lxqt-config-appearance/lxqtthemeconfig.cpp
index 49b65e8b..8bc903f8 100644
--- a/lxqt-config-appearance/lxqtthemeconfig.cpp
+++ b/lxqt-config-appearance/lxqtthemeconfig.cpp
@@ -32,6 +32,11 @@
#include <QProcess>
#include <QItemDelegate>
#include <QPainter>
+#include <QMenu>
+#include <QDesktopServices>
+#include <QUrl>
+
+#include <XdgDirs>
/*!
* \brief Simple delegate to draw system background color below decoration/icon
@@ -84,6 +89,10 @@ LXQtThemeConfig::LXQtThemeConfig(LXQt::Settings *settings, QWidget *parent) :
{
QString themeName = theme.name();
themeName[0] = themeName[0].toTitleCase();
+ if (theme.path().contains(XdgDirs::dataHome(false) + QStringLiteral("/")))
+ {
+ themeName += QStringLiteral(" ") + tr("(User Theme)");
+ }
QTreeWidgetItem *item = new QTreeWidgetItem(QStringList(themeName));
if (!theme.previewImage().isEmpty())
{
@@ -93,11 +102,16 @@ LXQtThemeConfig::LXQtThemeConfig(LXQt::Settings *settings, QWidget *parent) :
item->setData(0, Qt::UserRole, theme.name());
ui->lxqtThemeList->addTopLevelItem(item);
}
+ ui->lxqtThemeList->sortItems(0, Qt::AscendingOrder);
+ ui->lxqtThemeList->setContextMenuPolicy(Qt::CustomContextMenu);
initControls();
connect(ui->lxqtThemeList, &QTreeWidget::currentItemChanged, this, &LXQtThemeConfig::settingsChanged);
connect(ui->wallpaperOverride, &QAbstractButton::clicked, this, &LXQtThemeConfig::settingsChanged);
+
+ connect(ui->lxqtThemeList, &QTreeWidget::itemDoubleClicked, this, &LXQtThemeConfig::doubleClicked);
+ connect(ui->lxqtThemeList, &QWidget::customContextMenuRequested, this, &LXQtThemeConfig::contextMenu);
}
@@ -145,3 +159,29 @@ void LXQtThemeConfig::applyLxqtTheme()
}
}
}
+
+void LXQtThemeConfig::doubleClicked(QTreeWidgetItem *item, int /*column*/)
+{
+ if (!item)
+ return;
+
+ LXQt::LXQtTheme theme{item->data(0, Qt::UserRole).toString()};
+ if (!theme.isValid())
+ return;
+
+ // first try "qtxdg-mat"; fall back to QDesktopServices if we are not inside an LXQt session
+ if (!QProcess::startDetached(QStringLiteral("qtxdg-mat"), QStringList() << QStringLiteral("open") << theme.path()))
+ {
+ QDesktopServices::openUrl(QUrl(theme.path()));
+ }
+}
+
+void LXQtThemeConfig::contextMenu(const QPoint& p)
+{
+ QMenu menu;
+ QAction *a = menu.addAction(tr("Open theme folder"));
+ connect(a, &QAction::triggered, [this, p] {
+ doubleClicked(ui->lxqtThemeList->itemAt(p), 0);
+ });
+ menu.exec(ui->lxqtThemeList->viewport()->mapToGlobal(p));
+}
diff --git a/lxqt-config-appearance/lxqtthemeconfig.h b/lxqt-config-appearance/lxqtthemeconfig.h
index 8846dbbe..1886738c 100644
--- a/lxqt-config-appearance/lxqtthemeconfig.h
+++ b/lxqt-config-appearance/lxqtthemeconfig.h
@@ -53,6 +53,10 @@ public slots:
signals:
void settingsChanged();
+private slots:
+ void doubleClicked(QTreeWidgetItem *item, int column);
+ void contextMenu(const QPoint& p);
+
private:
Ui::LXQtThemeConfig *ui;
LXQt::Settings *mSettings;