summaryrefslogtreecommitdiff
path: root/kde-frameworks/plasma/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-02-01 21:05:47 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-02-01 21:05:47 +0000
commit60f657b5e6155f26601c7def7baa11cee72246d0 (patch)
tree25aecda1c8de352c03f653934407abebf384a560 /kde-frameworks/plasma/files
parente523ebcd50638ebe53f8f425d126bfa7385703b5 (diff)
gentoo auto-resync : 01:02:2023 - 21:05:47
Diffstat (limited to 'kde-frameworks/plasma/files')
-rw-r--r--kde-frameworks/plasma/files/plasma-5.102.0-fix-calc-of-distance-betw-dialog-and-parent-applet.patch44
1 files changed, 44 insertions, 0 deletions
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
new file mode 100644
index 000000000000..13f7a7e20232
--- /dev/null
+++ b/kde-frameworks/plasma/files/plasma-5.102.0-fix-calc-of-distance-betw-dialog-and-parent-applet.patch
@@ -0,0 +1,44 @@
+From 1e0042c750756d0963d11d125978f47ea830d495 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Niccol=C3=B2=20Venerandi?= <niccolo@venerandi.com>
+Date: Tue, 31 Jan 2023 20:25:06 +0000
+Subject: [PATCH] Dialog: Fix calculation of distance between dialog and parent
+ applet
+
+`ParentRect` is not using the same coordinate system as `dialogPos` and `avail`,
+which could result in incorrect placement of dialogs when you have e.g. multiple
+monitors or a non-maximized panel. This replaces `ParentRect` with `dialogPos` so
+the coordinate systems remain in sync.
+
+BUG:464201
+BUG:464513
+FIXED-IN: 5.103
+
+
+(cherry picked from commit eda6caabcffff484544af8949d0ca0a3ea3ce333)
+---
+ src/plasmaquick/dialog.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/plasmaquick/dialog.cpp b/src/plasmaquick/dialog.cpp
+index 786d7ebe2..bdbdd028b 100644
+--- a/src/plasmaquick/dialog.cpp
++++ b/src/plasmaquick/dialog.cpp
+@@ -1249,13 +1249,13 @@ QPoint Dialog::popupPosition(QQuickItem *item, const QSize &size)
+ switch (d->location) {
+ case Plasma::Types::TopEdge:
+ case Plasma::Types::BottomEdge:
+- if (qAbs(parentRect.center().x() - avail.center().x() ) < size.width() / 2 - parentRect.width() / 3) {
++ if (qAbs(dialogPos.x() + size.width() / 2 - avail.center().x() ) < size.width() / 2 - parentRect.width() / 3) {
+ dialogPos.setX(avail.center().x() - size.width() / 2);
+ }
+ break;
+ case Plasma::Types::LeftEdge:
+ case Plasma::Types::RightEdge:
+- if (qAbs(parentRect.center().y() - avail.center().y() ) < size.height() / 2 - parentRect.height() / 3) {
++ if (qAbs(dialogPos.y() + size.height() / 2 - avail.center().y() ) < size.height() / 2 - parentRect.height() / 3) {
+ dialogPos.setY(avail.center().y() - size.height() / 2);
+ }
+ break;
+--
+GitLab
+