1 |
commit: b6b11acbe0aba20b6c8a1f4b774399c134783ebe |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jan 20 11:50:38 2022 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 20 13:24:18 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b6b11acb |
7 |
|
8 |
kde-frameworks/qqc2-desktop-style: Fix menu metrics to match QStyle |
9 |
|
10 |
Upstream commit bc0ca29bd47ce45b30c66bd8743b6a48e20123d2 |
11 |
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=447289 |
12 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
13 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
14 |
|
15 |
.../qqc2-desktop-style-5.90.0-KDEBUG-447289.patch | 63 ++++++++++++++++++++++ |
16 |
.../qqc2-desktop-style-5.90.0-r1.ebuild | 31 +++++++++++ |
17 |
2 files changed, 94 insertions(+) |
18 |
|
19 |
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 |
20 |
new file mode 100644 |
21 |
index 000000000000..69991acb5c75 |
22 |
--- /dev/null |
23 |
+++ b/kde-frameworks/qqc2-desktop-style/files/qqc2-desktop-style-5.90.0-KDEBUG-447289.patch |
24 |
@@ -0,0 +1,63 @@ |
25 |
+From bc0ca29bd47ce45b30c66bd8743b6a48e20123d2 Mon Sep 17 00:00:00 2001 |
26 |
+From: Nate Graham <nate@×××.org> |
27 |
+Date: Thu, 23 Dec 2021 12:11:28 -0700 |
28 |
+Subject: [PATCH] Use metrics from Breeze for menu items |
29 |
+ |
30 |
+We can't read them dynamically right now, unfortunately. So the values |
31 |
+are hardcoded. |
32 |
+ |
33 |
+BUG: 447289 |
34 |
+FIXED-IN: 5.91 |
35 |
+--- |
36 |
+ org.kde.desktop/Menu.qml | 3 +++ |
37 |
+ org.kde.desktop/MenuItem.qml | 6 +++--- |
38 |
+ 2 files changed, 6 insertions(+), 3 deletions(-) |
39 |
+ |
40 |
+diff --git a/org.kde.desktop/Menu.qml b/org.kde.desktop/Menu.qml |
41 |
+index adaf644..205c0b7 100644 |
42 |
+--- a/org.kde.desktop/Menu.qml |
43 |
++++ b/org.kde.desktop/Menu.qml |
44 |
+@@ -37,6 +37,9 @@ T.Menu { |
45 |
+ } |
46 |
+ return maxWidth; |
47 |
+ } |
48 |
++ |
49 |
++ spacing: 0 // Hardcoded to the Breeze theme value |
50 |
++ |
51 |
+ interactive: ApplicationWindow.window ? contentHeight > ApplicationWindow.window.height : false |
52 |
+ clip: true |
53 |
+ currentIndex: control.currentIndex || 0 |
54 |
+diff --git a/org.kde.desktop/MenuItem.qml b/org.kde.desktop/MenuItem.qml |
55 |
+index d8a7cf0..f0c95e5 100644 |
56 |
+--- a/org.kde.desktop/MenuItem.qml |
57 |
++++ b/org.kde.desktop/MenuItem.qml |
58 |
+@@ -25,7 +25,7 @@ T.MenuItem { |
59 |
+ |
60 |
+ Layout.fillWidth: true |
61 |
+ padding: Kirigami.Units.smallSpacing |
62 |
+- verticalPadding: Math.floor(Kirigami.Units.smallSpacing * 1.5) |
63 |
++ verticalPadding: 4 // Hardcoded to the Breeze theme value |
64 |
+ hoverEnabled: !Kirigami.Settings.isMobile |
65 |
+ |
66 |
+ Kirigami.MnemonicData.enabled: controlRoot.enabled && controlRoot.visible |
67 |
+@@ -53,7 +53,7 @@ T.MenuItem { |
68 |
+ visible: (controlRoot.ListView.view && controlRoot.ListView.view.hasIcons) || (controlRoot.icon != undefined && (controlRoot.icon.name.length > 0 || controlRoot.icon.source.length > 0)) |
69 |
+ source: controlRoot.icon ? (controlRoot.icon.name || controlRoot.icon.source) : "" |
70 |
+ color: controlRoot.icon ? controlRoot.icon.color : "transparent" |
71 |
+- Layout.preferredHeight: Math.max(Kirigami.Units.iconSizes.roundedIconSize(label.height), Kirigami.Units.iconSizes.small) |
72 |
++ Layout.preferredHeight: Kirigami.Units.iconSizes.small |
73 |
+ Layout.preferredWidth: Layout.preferredHeight |
74 |
+ } |
75 |
+ Label { |
76 |
+@@ -94,7 +94,7 @@ T.MenuItem { |
77 |
+ x: controlRoot.mirrored ? controlRoot.padding : controlRoot.width - width - controlRoot.padding |
78 |
+ y: controlRoot.topPadding + (controlRoot.availableHeight - height) / 2 |
79 |
+ source: controlRoot.mirrored ? "go-next-symbolic-rtl" : "go-next-symbolic" |
80 |
+- width: Math.max(Kirigami.Units.iconSizes.roundedIconSize(label.height), Kirigami.Units.iconSizes.small) |
81 |
++ width: Kirigami.Units.iconSizes.small |
82 |
+ height: width |
83 |
+ visible: controlRoot.subMenu |
84 |
+ } |
85 |
+-- |
86 |
+GitLab |
87 |
+ |
88 |
|
89 |
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 |
90 |
new file mode 100644 |
91 |
index 000000000000..0f870ace3d87 |
92 |
--- /dev/null |
93 |
+++ b/kde-frameworks/qqc2-desktop-style/qqc2-desktop-style-5.90.0-r1.ebuild |
94 |
@@ -0,0 +1,31 @@ |
95 |
+# Copyright 1999-2022 Gentoo Authors |
96 |
+# Distributed under the terms of the GNU General Public License v2 |
97 |
+ |
98 |
+EAPI=8 |
99 |
+ |
100 |
+ECM_QTHELP="false" |
101 |
+PVCUT=$(ver_cut 1-2) |
102 |
+QTMIN=5.15.2 |
103 |
+inherit ecm kde.org |
104 |
+ |
105 |
+DESCRIPTION="Style for QtQuickControls 2 that uses QWidget's QStyle for painting" |
106 |
+ |
107 |
+LICENSE="|| ( GPL-2+ LGPL-3+ )" |
108 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" |
109 |
+IUSE="" |
110 |
+ |
111 |
+DEPEND=" |
112 |
+ >=dev-qt/qtdeclarative-${QTMIN}:5= |
113 |
+ >=dev-qt/qtgui-${QTMIN}:5 |
114 |
+ >=dev-qt/qtwidgets-${QTMIN}:5 |
115 |
+ =kde-frameworks/kconfigwidgets-${PVCUT}*:5 |
116 |
+ =kde-frameworks/kiconthemes-${PVCUT}*:5 |
117 |
+ =kde-frameworks/kirigami-${PVCUT}*:5 |
118 |
+ =kde-frameworks/sonnet-${PVCUT}*:5[qml] |
119 |
+" |
120 |
+RDEPEND="${DEPEND} |
121 |
+ >=dev-qt/qtgraphicaleffects-${QTMIN}:5 |
122 |
+ >=dev-qt/qtquickcontrols2-${QTMIN}:5 |
123 |
+" |
124 |
+ |
125 |
+PATCHES=( "${FILESDIR}/${P}-KDEBUG-447289.patch" ) |