summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2024-11-18 16:36:43 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2024-11-18 21:03:46 +0100
commitb59fa71c78d94704ceaeb4bf0aa7941dd1653339 (patch)
treea07725a565fb2c511caa22b1b4975c07540b2f1c /kde-plasma/plasma-desktop
parentkde-plasma/plasma-desktop: Backport IUSE input_devices_wacom to 6.2 (diff)
downloadgentoo-b59fa71c78d94704ceaeb4bf0aa7941dd1653339.tar.gz
gentoo-b59fa71c78d94704ceaeb4bf0aa7941dd1653339.tar.bz2
gentoo-b59fa71c78d94704ceaeb4bf0aa7941dd1653339.zip
kde-plasma/plasma-desktop: Fill panel size w/ flexible spacer in panel
KDE-bug: https://bugs.kde.org/495378 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-plasma/plasma-desktop')
-rw-r--r--kde-plasma/plasma-desktop/files/plasma-desktop-6.2.3-panel-fix-flexible-spacer.patch70
-rw-r--r--kde-plasma/plasma-desktop/plasma-desktop-6.2.3-r1.ebuild1
2 files changed, 71 insertions, 0 deletions
diff --git a/kde-plasma/plasma-desktop/files/plasma-desktop-6.2.3-panel-fix-flexible-spacer.patch b/kde-plasma/plasma-desktop/files/plasma-desktop-6.2.3-panel-fix-flexible-spacer.patch
new file mode 100644
index 000000000000..185b1493102b
--- /dev/null
+++ b/kde-plasma/plasma-desktop/files/plasma-desktop-6.2.3-panel-fix-flexible-spacer.patch
@@ -0,0 +1,70 @@
+From 8789c9c2a847d2e1c83b8de7b915cf9888e68937 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Niccol=C3=B2=20Venerandi?= <niccolo@venerandi.com>
+Date: Thu, 7 Nov 2024 13:30:27 +0000
+Subject: [PATCH] Fill panel width/height in custom/fit content modes when
+ flexible spacer is in panel
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The flexible spacer should always make the panel gain its maximum
+width/height; this implements that.
+
+BUG:495378
+
+
+(cherry picked from commit 7d2e16b09d391b7bc979e447d21bc8747399c55d)
+
+Co-authored-by: Niccolò Venerandi <niccolo@venerandi.com>
+---
+ containments/panel/contents/ui/main.qml | 6 ++++++
+ desktoppackage/contents/views/Panel.qml | 14 ++++++++++++++
+ 2 files changed, 20 insertions(+)
+
+diff --git a/containments/panel/contents/ui/main.qml b/containments/panel/contents/ui/main.qml
+index 2570f9f520..e69131d6a6 100644
+--- a/containments/panel/contents/ui/main.qml
++++ b/containments/panel/contents/ui/main.qml
+@@ -26,6 +26,12 @@ ContainmentItem {
+ //BEGIN properties
+ Layout.preferredWidth: fixedWidth || currentLayout.implicitWidth + currentLayout.horizontalDisplacement
+ Layout.preferredHeight: fixedHeight || currentLayout.implicitHeight + currentLayout.verticalDisplacement
++ Layout.fillWidth: {
++ return currentLayout.children
++ .filter(child => child?.applet?.plasmoid?.pluginName === "org.kde.plasma.panelspacer")
++ .some(child => child.applet.plasmoid.configuration.expanding)
++ }
++ Layout.fillHeight: Layout.fillWidth
+
+ property Item toolBox
+ property var layoutManager: LayoutManager
+diff --git a/desktoppackage/contents/views/Panel.qml b/desktoppackage/contents/views/Panel.qml
+index 2083123282..a4fab11699 100644
+--- a/desktoppackage/contents/views/Panel.qml
++++ b/desktoppackage/contents/views/Panel.qml
+@@ -275,8 +275,22 @@ Item {
+ return;
+ }
+ if (verticalPanel) {
++ if (containment.Layout.fillHeight) {
++ if (panel.lengthMode == Panel.Global.Custom) {
++ return panel.maximumHeight
++ } else {
++ return panel.screenGeometry.height
++ }
++ }
+ return containment.Layout.preferredHeight
+ } else {
++ if (containment.Layout.fillWidth) {
++ if (panel.lengthMode == Panel.Global.Custom) {
++ return panel.maximumWidth
++ } else {
++ return panel.screenGeometry.width
++ }
++ }
+ return containment.Layout.preferredWidth
+ }
+ }
+--
+GitLab
+
diff --git a/kde-plasma/plasma-desktop/plasma-desktop-6.2.3-r1.ebuild b/kde-plasma/plasma-desktop/plasma-desktop-6.2.3-r1.ebuild
index 429089f8e01a..b7e4dd945e2e 100644
--- a/kde-plasma/plasma-desktop/plasma-desktop-6.2.3-r1.ebuild
+++ b/kde-plasma/plasma-desktop/plasma-desktop-6.2.3-r1.ebuild
@@ -129,6 +129,7 @@ BDEPEND="
PATCHES=(
"${FILESDIR}/${PN}-6.1.80-override-include-dirs.patch" # downstream patch
"${FILESDIR}/${P}-tablet-kcm-optional.patch" # bug 942817
+ "${FILESDIR}/${P}-panel-fix-flexible-spacer.patch" # KDE-bug 495378
)
src_prepare() {