summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2022-01-20 12:50:38 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2022-01-20 14:24:18 +0100
commitb6b11acbe0aba20b6c8a1f4b774399c134783ebe (patch)
tree1e5466b3d939ae39636e69e78c22e854e471b9f1 /kde-frameworks/qqc2-desktop-style
parentkde-frameworks/ktexteditor: Drop 5.90.0 (r0) (diff)
downloadgentoo-b6b11acbe0aba20b6c8a1f4b774399c134783ebe.tar.gz
gentoo-b6b11acbe0aba20b6c8a1f4b774399c134783ebe.tar.bz2
gentoo-b6b11acbe0aba20b6c8a1f4b774399c134783ebe.zip
kde-frameworks/qqc2-desktop-style: Fix menu metrics to match QStyle
Upstream commit bc0ca29bd47ce45b30c66bd8743b6a48e20123d2 KDE-bug: https://bugs.kde.org/show_bug.cgi?id=447289 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-frameworks/qqc2-desktop-style')
-rw-r--r--kde-frameworks/qqc2-desktop-style/files/qqc2-desktop-style-5.90.0-KDEBUG-447289.patch63
-rw-r--r--kde-frameworks/qqc2-desktop-style/qqc2-desktop-style-5.90.0-r1.ebuild31
2 files changed, 94 insertions, 0 deletions
diff --git a/kde-frameworks/qqc2-desktop-style/files/qqc2-desktop-style-5.90.0-KDEBUG-447289.patch b/kde-frameworks/qqc2-desktop-style/files/qqc2-desktop-style-5.90.0-KDEBUG-447289.patch
new file mode 100644
index 000000000000..69991acb5c75
--- /dev/null
+++ b/kde-frameworks/qqc2-desktop-style/files/qqc2-desktop-style-5.90.0-KDEBUG-447289.patch
@@ -0,0 +1,63 @@
+From bc0ca29bd47ce45b30c66bd8743b6a48e20123d2 Mon Sep 17 00:00:00 2001
+From: Nate Graham <nate@kde.org>
+Date: Thu, 23 Dec 2021 12:11:28 -0700
+Subject: [PATCH] Use metrics from Breeze for menu items
+
+We can't read them dynamically right now, unfortunately. So the values
+are hardcoded.
+
+BUG: 447289
+FIXED-IN: 5.91
+---
+ org.kde.desktop/Menu.qml | 3 +++
+ org.kde.desktop/MenuItem.qml | 6 +++---
+ 2 files changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/org.kde.desktop/Menu.qml b/org.kde.desktop/Menu.qml
+index adaf644..205c0b7 100644
+--- a/org.kde.desktop/Menu.qml
++++ b/org.kde.desktop/Menu.qml
+@@ -37,6 +37,9 @@ T.Menu {
+ }
+ return maxWidth;
+ }
++
++ spacing: 0 // Hardcoded to the Breeze theme value
++
+ interactive: ApplicationWindow.window ? contentHeight > ApplicationWindow.window.height : false
+ clip: true
+ currentIndex: control.currentIndex || 0
+diff --git a/org.kde.desktop/MenuItem.qml b/org.kde.desktop/MenuItem.qml
+index d8a7cf0..f0c95e5 100644
+--- a/org.kde.desktop/MenuItem.qml
++++ b/org.kde.desktop/MenuItem.qml
+@@ -25,7 +25,7 @@ T.MenuItem {
+
+ Layout.fillWidth: true
+ padding: Kirigami.Units.smallSpacing
+- verticalPadding: Math.floor(Kirigami.Units.smallSpacing * 1.5)
++ verticalPadding: 4 // Hardcoded to the Breeze theme value
+ hoverEnabled: !Kirigami.Settings.isMobile
+
+ Kirigami.MnemonicData.enabled: controlRoot.enabled && controlRoot.visible
+@@ -53,7 +53,7 @@ T.MenuItem {
+ visible: (controlRoot.ListView.view && controlRoot.ListView.view.hasIcons) || (controlRoot.icon != undefined && (controlRoot.icon.name.length > 0 || controlRoot.icon.source.length > 0))
+ source: controlRoot.icon ? (controlRoot.icon.name || controlRoot.icon.source) : ""
+ color: controlRoot.icon ? controlRoot.icon.color : "transparent"
+- Layout.preferredHeight: Math.max(Kirigami.Units.iconSizes.roundedIconSize(label.height), Kirigami.Units.iconSizes.small)
++ Layout.preferredHeight: Kirigami.Units.iconSizes.small
+ Layout.preferredWidth: Layout.preferredHeight
+ }
+ Label {
+@@ -94,7 +94,7 @@ T.MenuItem {
+ x: controlRoot.mirrored ? controlRoot.padding : controlRoot.width - width - controlRoot.padding
+ y: controlRoot.topPadding + (controlRoot.availableHeight - height) / 2
+ source: controlRoot.mirrored ? "go-next-symbolic-rtl" : "go-next-symbolic"
+- width: Math.max(Kirigami.Units.iconSizes.roundedIconSize(label.height), Kirigami.Units.iconSizes.small)
++ width: Kirigami.Units.iconSizes.small
+ height: width
+ visible: controlRoot.subMenu
+ }
+--
+GitLab
+
diff --git a/kde-frameworks/qqc2-desktop-style/qqc2-desktop-style-5.90.0-r1.ebuild b/kde-frameworks/qqc2-desktop-style/qqc2-desktop-style-5.90.0-r1.ebuild
new file mode 100644
index 000000000000..0f870ace3d87
--- /dev/null
+++ b/kde-frameworks/qqc2-desktop-style/qqc2-desktop-style-5.90.0-r1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_QTHELP="false"
+PVCUT=$(ver_cut 1-2)
+QTMIN=5.15.2
+inherit ecm kde.org
+
+DESCRIPTION="Style for QtQuickControls 2 that uses QWidget's QStyle for painting"
+
+LICENSE="|| ( GPL-2+ LGPL-3+ )"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+IUSE=""
+
+DEPEND="
+ >=dev-qt/qtdeclarative-${QTMIN}:5=
+ >=dev-qt/qtgui-${QTMIN}:5
+ >=dev-qt/qtwidgets-${QTMIN}:5
+ =kde-frameworks/kconfigwidgets-${PVCUT}*:5
+ =kde-frameworks/kiconthemes-${PVCUT}*:5
+ =kde-frameworks/kirigami-${PVCUT}*:5
+ =kde-frameworks/sonnet-${PVCUT}*:5[qml]
+"
+RDEPEND="${DEPEND}
+ >=dev-qt/qtgraphicaleffects-${QTMIN}:5
+ >=dev-qt/qtquickcontrols2-${QTMIN}:5
+"
+
+PATCHES=( "${FILESDIR}/${P}-KDEBUG-447289.patch" )