Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/plasma/, kde-frameworks/plasma/files/
Date: Tue, 23 Nov 2021 14:59:38
Message-Id: 1637679551.6cd2d37aef9a8974b31772a99496f0905e25c64b.asturm@gentoo
1 commit: 6cd2d37aef9a8974b31772a99496f0905e25c64b
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Mon Nov 15 14:38:30 2021 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Tue Nov 23 14:59:11 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6cd2d37a
7
8 kde-frameworks/plasma: Visual fixes
9
10 Make the OSD an actual wayland OSD
11 KDE-bug: https://bugs.kde.org/show_bug.cgi?id=428859
12 Upstream commit 2ba1b0b642d540f74f0e21e7aaa272644ea4eda5
13
14 Fixed a visual glitch with Plasma tooltips flickering
15 KDE-bug: https://bugs.kde.org/show_bug.cgi?id=305247
16 Upstream commit 6176d8ef8f36290075c5bd8932d623e68468a1cd
17
18 Fix centered icons and text in Plasma applet tabs
19 KDE-bug: https://bugs.kde.org/show_bug.cgi?id=442830
20 Upstream commit 92ac1038cff333d70a71331b2a5fa0b9d91bc39d
21
22 Package-Manager: Portage-3.0.28, Repoman-3.0.3
23 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
24
25 .../files/plasma-5.88.0-fix-centered-text.patch | 121 +++++++++++++++++++++
26 ....88.0-fix-misrenderings-with-transparency.patch | 34 ++++++
27 ...sma-5.88.0-make-OSD-an-actual-wayland-OSD.patch | 34 ++++++
28 kde-frameworks/plasma/plasma-5.88.0-r1.ebuild | 79 ++++++++++++++
29 4 files changed, 268 insertions(+)
30
31 diff --git a/kde-frameworks/plasma/files/plasma-5.88.0-fix-centered-text.patch b/kde-frameworks/plasma/files/plasma-5.88.0-fix-centered-text.patch
32 new file mode 100644
33 index 000000000000..8fb393a568d6
34 --- /dev/null
35 +++ b/kde-frameworks/plasma/files/plasma-5.88.0-fix-centered-text.patch
36 @@ -0,0 +1,121 @@
37 +From 92ac1038cff333d70a71331b2a5fa0b9d91bc39d Mon Sep 17 00:00:00 2001
38 +From: Eugene Popov <popov895@×××.net>
39 +Date: Fri, 19 Nov 2021 11:13:03 +0000
40 +Subject: [PATCH] Fix IconLabel
41 +
42 +---
43 + .../plasmacomponents3/private/IconLabel.qml | 97 +++++++++++--------
44 + 1 file changed, 55 insertions(+), 42 deletions(-)
45 +
46 +diff --git a/src/declarativeimports/plasmacomponents3/private/IconLabel.qml b/src/declarativeimports/plasmacomponents3/private/IconLabel.qml
47 +index 467c2f54b..74a8ff3a5 100644
48 +--- a/src/declarativeimports/plasmacomponents3/private/IconLabel.qml
49 ++++ b/src/declarativeimports/plasmacomponents3/private/IconLabel.qml
50 +@@ -24,49 +24,62 @@ T.Control {
51 + PlasmaCore.ColorScope.inherit: true
52 + implicitWidth: implicitContentWidth + leftPadding + rightPadding
53 + implicitHeight: implicitContentHeight + topPadding + bottomPadding
54 +- contentItem: GridLayout {
55 +- rowSpacing: root.spacing
56 +- columnSpacing: root.spacing
57 +- flow: root.display === T.AbstractButton.TextUnderIcon ? GridLayout.TopToBottom : GridLayout.LeftToRight
58 +- PlasmaCore.IconItem {
59 +- id: iconItem
60 +- visible: valid && width > 0 && height > 0 && root.display !== T.AbstractButton.TextOnly
61 +- colorGroup: root.PlasmaCore.ColorScope.colorGroup
62 +- implicitWidth: PlasmaCore.Units.iconSizes.sizeForLabels
63 +- implicitHeight: PlasmaCore.Units.iconSizes.sizeForLabels
64 +- Layout.fillWidth: true
65 +- Layout.fillHeight: true
66 +- Layout.maximumWidth: implicitWidth > 0 ? implicitWidth : Number.POSITIVE_INFINITY
67 +- Layout.maximumHeight: implicitHeight > 0 ? implicitHeight : Number.POSITIVE_INFINITY
68 +- Layout.alignment: if (root.textBesideIcon) {
69 +- Qt.AlignRight | Qt.AlignVCenter
70 +- } else if (root.textUnderIcon) {
71 +- Qt.AlignHCenter | Qt.AlignBottom
72 +- } else {
73 +- Qt.AlignCenter
74 ++ contentItem: Item {
75 ++ implicitWidth: gridLayout.implicitWidth
76 ++ implicitHeight: gridLayout.implicitHeight
77 ++ GridLayout {
78 ++ id: gridLayout
79 ++ rowSpacing: root.spacing
80 ++ columnSpacing: root.spacing
81 ++ flow: root.display === T.AbstractButton.TextUnderIcon ? GridLayout.TopToBottom : GridLayout.LeftToRight
82 ++ x: {
83 ++ if (root.alignment & Qt.AlignLeft) {
84 ++ return 0;
85 ++ }
86 ++ if (root.alignment & Qt.AlignRight) {
87 ++ return parent.width - width;
88 ++ }
89 ++ return Math.round((parent.width - width) / 2);
90 + }
91 +- }
92 +- T.Label {
93 +- id: label
94 +- visible: text.length > 0 && root.display !== T.AbstractButton.IconOnly
95 +- palette: root.palette
96 +- font: root.font
97 +- horizontalAlignment: root.alignment & Qt.AlignHorizontal_Mask || Text.AlignHCenter
98 +- verticalAlignment: root.alignment & Qt.AlignVertical_Mask || Text.AlignVCenter
99 +- // Work around Qt bug where NativeRendering breaks for non-integer scale factors
100 +- // https://bugreports.qt.io/browse/QTBUG-70481
101 +- renderType: Screen.devicePixelRatio % 1 !== 0 ? Text.QtRendering : Text.NativeRendering
102 +- color: PlasmaCore.ColorScope.textColor
103 +- linkColor: PlasmaCore.Theme.linkColor
104 +- elide: Text.ElideRight
105 +- Layout.fillWidth: root.alignment & Qt.AlignHorizontal_Mask
106 +- Layout.fillHeight: root.alignment & Qt.AlignVertical_Mask
107 +- Layout.alignment: if (root.textBesideIcon) {
108 +- Qt.AlignLeft | Qt.AlignVCenter
109 +- } else if (root.textUnderIcon) {
110 +- Qt.AlignHCenter | Qt.AlignTop
111 +- } else {
112 +- Qt.AlignCenter
113 ++ y: {
114 ++ if (root.alignment & Qt.AlignTop) {
115 ++ return 0;
116 ++ }
117 ++ if (root.alignment & Qt.AlignBottom) {
118 ++ return parent.height - height;
119 ++ }
120 ++ return Math.round((parent.height - height) / 2);
121 ++ }
122 ++ width: Math.min(parent.width, implicitWidth)
123 ++ height: Math.min(parent.height, implicitHeight)
124 ++ PlasmaCore.IconItem {
125 ++ id: iconItem
126 ++ visible: valid && width > 0 && height > 0 && root.display !== T.AbstractButton.TextOnly
127 ++ colorGroup: root.PlasmaCore.ColorScope.colorGroup
128 ++ implicitWidth: PlasmaCore.Units.iconSizes.sizeForLabels
129 ++ implicitHeight: PlasmaCore.Units.iconSizes.sizeForLabels
130 ++ Layout.alignment: Qt.AlignCenter
131 ++ Layout.maximumWidth: implicitWidth > 0 ? implicitWidth : Number.POSITIVE_INFINITY
132 ++ Layout.maximumHeight: implicitHeight > 0 ? implicitHeight : Number.POSITIVE_INFINITY
133 ++ }
134 ++ T.Label {
135 ++ id: label
136 ++ visible: text.length > 0 && root.display !== T.AbstractButton.IconOnly
137 ++ palette: root.palette
138 ++ font: root.font
139 ++ // Work around Qt bug where NativeRendering breaks for non-integer scale factors
140 ++ // https://bugreports.qt.io/browse/QTBUG-70481
141 ++ renderType: Screen.devicePixelRatio % 1 !== 0 ? Text.QtRendering : Text.NativeRendering
142 ++ color: PlasmaCore.ColorScope.textColor
143 ++ linkColor: PlasmaCore.Theme.linkColor
144 ++ elide: Text.ElideRight
145 ++ Layout.alignment: Qt.AlignCenter
146 ++ Layout.fillWidth: {
147 ++ if (!iconItem.visible || parent.flow === GridLayout.TopToBottom) {
148 ++ return implicitWidth > parent.width;
149 ++ }
150 ++ return iconItem.implicitWidth + parent.columnSpacing + implicitWidth > parent.width;
151 ++ }
152 + }
153 + }
154 + }
155 +--
156 +GitLab
157 +
158
159 diff --git a/kde-frameworks/plasma/files/plasma-5.88.0-fix-misrenderings-with-transparency.patch b/kde-frameworks/plasma/files/plasma-5.88.0-fix-misrenderings-with-transparency.patch
160 new file mode 100644
161 index 000000000000..d1e6f37d8a2b
162 --- /dev/null
163 +++ b/kde-frameworks/plasma/files/plasma-5.88.0-fix-misrenderings-with-transparency.patch
164 @@ -0,0 +1,34 @@
165 +From 6176d8ef8f36290075c5bd8932d623e68468a1cd Mon Sep 17 00:00:00 2001
166 +From: Marco Martin <notmart@×××××.com>
167 +Date: Tue, 16 Nov 2021 11:05:17 +0100
168 +Subject: [PATCH] Do updateTheme after QQuickWindow::event
169 +
170 +doing updatetheme there will ensure that the window size is correct,
171 +so then when the surface commit will happen, we'll have the blur
172 +and contrast regions wit hthe proper geometry
173 +
174 +BUG:305247
175 +---
176 + src/plasmaquick/dialog.cpp | 2 ++
177 + 1 file changed, 2 insertions(+)
178 +
179 +diff --git a/src/plasmaquick/dialog.cpp b/src/plasmaquick/dialog.cpp
180 +index eac7d432a..343bfe4c0 100644
181 +--- a/src/plasmaquick/dialog.cpp
182 ++++ b/src/plasmaquick/dialog.cpp
183 +@@ -1243,10 +1243,12 @@ bool Dialog::event(QEvent *event)
184 + // sometimes non null regions arrive even for non visible windows
185 + // for which surface creation would fail
186 + if (!d->shellSurface && isVisible()) {
187 ++ const bool ret = QQuickWindow::event(event);
188 + KWindowSystem::setState(winId(), NET::SkipTaskbar | NET::SkipPager | NET::SkipSwitcher);
189 + d->setupWaylandIntegration();
190 + d->updateVisibility(true);
191 + d->updateTheme();
192 ++ return ret;
193 + }
194 + #endif
195 + } else if (event->type() == QEvent::PlatformSurface) {
196 +--
197 +GitLab
198 +
199
200 diff --git a/kde-frameworks/plasma/files/plasma-5.88.0-make-OSD-an-actual-wayland-OSD.patch b/kde-frameworks/plasma/files/plasma-5.88.0-make-OSD-an-actual-wayland-OSD.patch
201 new file mode 100644
202 index 000000000000..0631155c89bf
203 --- /dev/null
204 +++ b/kde-frameworks/plasma/files/plasma-5.88.0-make-OSD-an-actual-wayland-OSD.patch
205 @@ -0,0 +1,34 @@
206 +From 2ba1b0b642d540f74f0e21e7aaa272644ea4eda5 Mon Sep 17 00:00:00 2001
207 +From: Marco Martin <notmart@×××××.com>
208 +Date: Mon, 8 Nov 2021 16:12:38 +0000
209 +Subject: [PATCH] make the OSD an actual wayland OSD
210 +
211 +when the OnScreenDisplay type is set, set it on the plasma shell surface
212 +so KWin can actually treat it as such
213 +
214 +CCBUG:428859
215 +---
216 + src/plasmaquick/dialog.cpp | 7 +++++++
217 + 1 file changed, 7 insertions(+)
218 +
219 +diff --git a/src/plasmaquick/dialog.cpp b/src/plasmaquick/dialog.cpp
220 +index 4cea3a28e..3254b8320 100644
221 +--- a/src/plasmaquick/dialog.cpp
222 ++++ b/src/plasmaquick/dialog.cpp
223 +@@ -736,6 +736,13 @@ void DialogPrivate::applyType()
224 + if (!wmType) {
225 + KWindowSystem::setType(q->winId(), static_cast<NET::WindowType>(type));
226 + }
227 ++#if HAVE_KWAYLAND
228 ++ if (type == Dialog::OnScreenDisplay) {
229 ++ if (shellSurface) {
230 ++ shellSurface->setRole(KWayland::Client::PlasmaShellSurface::Role::OnScreenDisplay);
231 ++ }
232 ++ }
233 ++#endif
234 + } else {
235 + q->setFlags(Qt::FramelessWindowHint | q->flags());
236 +
237 +--
238 +GitLab
239 +
240
241 diff --git a/kde-frameworks/plasma/plasma-5.88.0-r1.ebuild b/kde-frameworks/plasma/plasma-5.88.0-r1.ebuild
242 new file mode 100644
243 index 000000000000..5a0e6848003e
244 --- /dev/null
245 +++ b/kde-frameworks/plasma/plasma-5.88.0-r1.ebuild
246 @@ -0,0 +1,79 @@
247 +# Copyright 1999-2021 Gentoo Authors
248 +# Distributed under the terms of the GNU General Public License v2
249 +
250 +EAPI=8
251 +
252 +KDE_ORG_NAME="${PN}-framework"
253 +PVCUT=$(ver_cut 1-2)
254 +QTMIN=5.15.2
255 +VIRTUALX_REQUIRED="test"
256 +inherit ecm kde.org
257 +
258 +DESCRIPTION="Plasma framework"
259 +
260 +LICENSE="LGPL-2+"
261 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
262 +IUSE="gles2-only man wayland X"
263 +
264 +RESTRICT="test"
265 +
266 +RDEPEND="
267 + >=dev-qt/qtdbus-${QTMIN}:5
268 + >=dev-qt/qtdeclarative-${QTMIN}:5
269 + >=dev-qt/qtgui-${QTMIN}:5[gles2-only=,X=]
270 + >=dev-qt/qtquickcontrols-${QTMIN}:5
271 + >=dev-qt/qtsql-${QTMIN}:5
272 + >=dev-qt/qtsvg-${QTMIN}:5
273 + >=dev-qt/qtwidgets-${QTMIN}:5
274 + =kde-frameworks/kactivities-${PVCUT}*:5
275 + =kde-frameworks/karchive-${PVCUT}*:5
276 + =kde-frameworks/kconfig-${PVCUT}*:5
277 + =kde-frameworks/kconfigwidgets-${PVCUT}*:5
278 + =kde-frameworks/kcoreaddons-${PVCUT}*:5
279 + =kde-frameworks/kdeclarative-${PVCUT}*:5
280 + =kde-frameworks/kglobalaccel-${PVCUT}*:5
281 + =kde-frameworks/kguiaddons-${PVCUT}*:5
282 + =kde-frameworks/ki18n-${PVCUT}*:5
283 + =kde-frameworks/kiconthemes-${PVCUT}*:5
284 + =kde-frameworks/kio-${PVCUT}*:5
285 + =kde-frameworks/kirigami-${PVCUT}*:5
286 + =kde-frameworks/knotifications-${PVCUT}*:5
287 + =kde-frameworks/kpackage-${PVCUT}*:5
288 + =kde-frameworks/kservice-${PVCUT}*:5
289 + =kde-frameworks/kwidgetsaddons-${PVCUT}*:5
290 + =kde-frameworks/kwindowsystem-${PVCUT}*:5
291 + =kde-frameworks/kxmlgui-${PVCUT}*:5
292 + !gles2-only? ( media-libs/libglvnd[X?] )
293 + wayland? (
294 + =kde-frameworks/kwayland-${PVCUT}*:5
295 + media-libs/libglvnd
296 + )
297 + X? (
298 + >=dev-qt/qtx11extras-${QTMIN}:5
299 + x11-libs/libX11
300 + x11-libs/libxcb
301 + )
302 +"
303 +DEPEND="${RDEPEND}
304 + X? ( x11-base/xorg-proto )
305 +"
306 +BDEPEND="man? ( >=kde-frameworks/kdoctools-${PVCUT}:5 )"
307 +
308 +PATCHES=(
309 + "${FILESDIR}"/${P}-make-OSD-an-actual-wayland-OSD.patch
310 + "${FILESDIR}"/${P}-fix-misrenderings-with-transparency.patch # KDE-bug 305247
311 + "${FILESDIR}"/${P}-fix-centered-text.patch # KDE-bug 442830
312 +)
313 +
314 +src_configure() {
315 + local mycmakeargs=(
316 + $(cmake_use_find_package !gles2-only OpenGL)
317 + $(cmake_use_find_package man KF5DocTools)
318 + $(cmake_use_find_package wayland EGL)
319 + $(cmake_use_find_package wayland KF5Wayland)
320 + $(cmake_use_find_package X X11)
321 + $(cmake_use_find_package X XCB)
322 + )
323 +
324 + ecm_src_configure
325 +}