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: Wed, 01 Feb 2023 19:46:35
Message-Id: 1675280768.ef23a0fa6a2c0c8ce8f397a395197da751d31a21.asturm@gentoo
1 commit: ef23a0fa6a2c0c8ce8f397a395197da751d31a21
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 1 19:42:54 2023 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 1 19:46:08 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ef23a0fa
7
8 kde-frameworks/plasma: Fix distance calc between dialog/parent applet
9
10 KDE-bug: https://bugs.kde.org/show_bug.cgi?id=464201
11 KDE-bug: https://bugs.kde.org/show_bug.cgi?id=464513
12
13 Bug: https://bugs.gentoo.org/891927
14 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
15
16 ...of-distance-betw-dialog-and-parent-applet.patch | 44 +++++++++++++
17 kde-frameworks/plasma/plasma-5.102.0-r3.ebuild | 75 ++++++++++++++++++++++
18 2 files changed, 119 insertions(+)
19
20 diff --git a/kde-frameworks/plasma/files/plasma-5.102.0-fix-calc-of-distance-betw-dialog-and-parent-applet.patch b/kde-frameworks/plasma/files/plasma-5.102.0-fix-calc-of-distance-betw-dialog-and-parent-applet.patch
21 new file mode 100644
22 index 000000000000..13f7a7e20232
23 --- /dev/null
24 +++ b/kde-frameworks/plasma/files/plasma-5.102.0-fix-calc-of-distance-betw-dialog-and-parent-applet.patch
25 @@ -0,0 +1,44 @@
26 +From 1e0042c750756d0963d11d125978f47ea830d495 Mon Sep 17 00:00:00 2001
27 +From: =?UTF-8?q?Niccol=C3=B2=20Venerandi?= <niccolo@×××××××××.com>
28 +Date: Tue, 31 Jan 2023 20:25:06 +0000
29 +Subject: [PATCH] Dialog: Fix calculation of distance between dialog and parent
30 + applet
31 +
32 +`ParentRect` is not using the same coordinate system as `dialogPos` and `avail`,
33 +which could result in incorrect placement of dialogs when you have e.g. multiple
34 +monitors or a non-maximized panel. This replaces `ParentRect` with `dialogPos` so
35 +the coordinate systems remain in sync.
36 +
37 +BUG:464201
38 +BUG:464513
39 +FIXED-IN: 5.103
40 +
41 +
42 +(cherry picked from commit eda6caabcffff484544af8949d0ca0a3ea3ce333)
43 +---
44 + src/plasmaquick/dialog.cpp | 4 ++--
45 + 1 file changed, 2 insertions(+), 2 deletions(-)
46 +
47 +diff --git a/src/plasmaquick/dialog.cpp b/src/plasmaquick/dialog.cpp
48 +index 786d7ebe2..bdbdd028b 100644
49 +--- a/src/plasmaquick/dialog.cpp
50 ++++ b/src/plasmaquick/dialog.cpp
51 +@@ -1249,13 +1249,13 @@ QPoint Dialog::popupPosition(QQuickItem *item, const QSize &size)
52 + switch (d->location) {
53 + case Plasma::Types::TopEdge:
54 + case Plasma::Types::BottomEdge:
55 +- if (qAbs(parentRect.center().x() - avail.center().x() ) < size.width() / 2 - parentRect.width() / 3) {
56 ++ if (qAbs(dialogPos.x() + size.width() / 2 - avail.center().x() ) < size.width() / 2 - parentRect.width() / 3) {
57 + dialogPos.setX(avail.center().x() - size.width() / 2);
58 + }
59 + break;
60 + case Plasma::Types::LeftEdge:
61 + case Plasma::Types::RightEdge:
62 +- if (qAbs(parentRect.center().y() - avail.center().y() ) < size.height() / 2 - parentRect.height() / 3) {
63 ++ if (qAbs(dialogPos.y() + size.height() / 2 - avail.center().y() ) < size.height() / 2 - parentRect.height() / 3) {
64 + dialogPos.setY(avail.center().y() - size.height() / 2);
65 + }
66 + break;
67 +--
68 +GitLab
69 +
70
71 diff --git a/kde-frameworks/plasma/plasma-5.102.0-r3.ebuild b/kde-frameworks/plasma/plasma-5.102.0-r3.ebuild
72 new file mode 100644
73 index 000000000000..b3a2bef794de
74 --- /dev/null
75 +++ b/kde-frameworks/plasma/plasma-5.102.0-r3.ebuild
76 @@ -0,0 +1,75 @@
77 +# Copyright 1999-2023 Gentoo Authors
78 +# Distributed under the terms of the GNU General Public License v2
79 +
80 +EAPI=8
81 +
82 +KDE_ORG_NAME="${PN}-framework"
83 +PVCUT=$(ver_cut 1-2)
84 +QTMIN=5.15.5
85 +VIRTUALX_REQUIRED="test"
86 +inherit ecm frameworks.kde.org
87 +
88 +DESCRIPTION="Plasma framework"
89 +
90 +LICENSE="LGPL-2+"
91 +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
92 +IUSE="gles2-only man wayland"
93 +
94 +RESTRICT="test"
95 +
96 +# kde-frameworks/kwindowsystem[X]: Unconditional use of KX11Extras
97 +RDEPEND="
98 + >=dev-qt/qtdbus-${QTMIN}:5
99 + >=dev-qt/qtdeclarative-${QTMIN}:5
100 + >=dev-qt/qtgui-${QTMIN}:5[gles2-only=,X]
101 + >=dev-qt/qtquickcontrols-${QTMIN}:5
102 + >=dev-qt/qtsql-${QTMIN}:5
103 + >=dev-qt/qtsvg-${QTMIN}:5
104 + >=dev-qt/qtwidgets-${QTMIN}:5
105 + >=dev-qt/qtx11extras-${QTMIN}:5
106 + =kde-frameworks/kactivities-${PVCUT}*:5
107 + =kde-frameworks/karchive-${PVCUT}*:5
108 + =kde-frameworks/kconfig-${PVCUT}*:5[qml]
109 + =kde-frameworks/kconfigwidgets-${PVCUT}*:5
110 + =kde-frameworks/kcoreaddons-${PVCUT}*:5
111 + =kde-frameworks/kdeclarative-${PVCUT}*:5
112 + =kde-frameworks/kglobalaccel-${PVCUT}*:5
113 + =kde-frameworks/kguiaddons-${PVCUT}*:5
114 + =kde-frameworks/ki18n-${PVCUT}*:5
115 + =kde-frameworks/kiconthemes-${PVCUT}*:5
116 + =kde-frameworks/kio-${PVCUT}*:5
117 + =kde-frameworks/kirigami-${PVCUT}*:5
118 + =kde-frameworks/knotifications-${PVCUT}*:5
119 + =kde-frameworks/kpackage-${PVCUT}*:5
120 + =kde-frameworks/kservice-${PVCUT}*:5
121 + =kde-frameworks/kwidgetsaddons-${PVCUT}*:5
122 + =kde-frameworks/kwindowsystem-${PVCUT}*:5[X]
123 + =kde-frameworks/kxmlgui-${PVCUT}*:5
124 + x11-libs/libX11
125 + x11-libs/libxcb
126 + !gles2-only? ( media-libs/libglvnd[X] )
127 + wayland? (
128 + =kde-frameworks/kwayland-${PVCUT}*:5
129 + media-libs/libglvnd
130 + )
131 +"
132 +DEPEND="${RDEPEND}
133 + x11-base/xorg-proto
134 +"
135 +BDEPEND="man? ( >=kde-frameworks/kdoctools-${PVCUT}:5 )"
136 +
137 +PATCHES=(
138 + "${FILESDIR}/${P}-fix-flicker-on-fade-animation.patch" # KDE-bug 463061, 463685
139 + "${FILESDIR}/${P}-fix-calc-of-distance-betw-dialog-and-parent-applet.patch" # KDE-bug 464201, 464513
140 +)
141 +
142 +src_configure() {
143 + local mycmakeargs=(
144 + $(cmake_use_find_package !gles2-only OpenGL)
145 + $(cmake_use_find_package man KF5DocTools)
146 + $(cmake_use_find_package wayland EGL)
147 + $(cmake_use_find_package wayland KF5Wayland)
148 + )
149 +
150 + ecm_src_configure
151 +}