summaryrefslogtreecommitdiff
path: root/kde-plasma/plasma-desktop/files/plasma-desktop-5.23.4-fix-touchpad-applet-popup-close-on-click.patch
blob: 1c9a2b79e31efa96c7aa19c7fb7ff0d2babcaafd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
From 2131daa05195a2b55f593acf3d323cf4c2a89936 Mon Sep 17 00:00:00 2001
From: Nate Graham <nate@kde.org>
Date: Thu, 2 Dec 2021 20:13:46 -0700
Subject: [PATCH] kcms/touchpad/applet: Make the popup close on click

BUG: 445982
FIXED-IN: 5.23.5
(cherry picked from commit 4cb2de984ab79bc257af0135bf92ea7390d5617f)
---
 .../applet/qml/contents/ui/touchpad.qml       | 23 +++++++++++--------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/kcms/touchpad/applet/qml/contents/ui/touchpad.qml b/kcms/touchpad/applet/qml/contents/ui/touchpad.qml
index 3f5eb722f..106859c3a 100644
--- a/kcms/touchpad/applet/qml/contents/ui/touchpad.qml
+++ b/kcms/touchpad/applet/qml/contents/ui/touchpad.qml
@@ -56,20 +56,23 @@ Item {
         connectedSources: dataSource.sources
     }
 
-    Plasmoid.compactRepresentation: PlasmaCore.ToolTipArea {
-        id: toolTip
+    Plasmoid.compactRepresentation: PlasmaCore.IconItem {
+        implicitWidth: PlasmaCore.Units.iconSizes.small
+        implicitHeight: PlasmaCore.Units.iconSizes.small
 
-        Layout.minimumWidth: PlasmaCore.Units.iconSizes.small
-        Layout.minimumHeight: Layout.minimumWidth
+        source: plasmoid.icon
+        active: parent.containsMouse
 
-        mainText: plasmoid.title
-        subText: plasmoid.toolTipSubText
+        PlasmaCore.ToolTipArea {
+            mainText: plasmoid.title
+            subText: plasmoid.toolTipSubText
+        }
 
-        PlasmaCore.IconItem {
+        MouseArea {
             anchors.fill: parent
-            source: plasmoid.icon
-            active: parent.containsMouse
-            enabled: root.hasTouchpad
+            onClicked: {
+                plasmoid.expanded = !plasmoid.expanded;
+            }
         }
     }
 
-- 
GitLab