summaryrefslogtreecommitdiff
path: root/kde-frameworks/plasma/files/plasma-5.92.0-fix-blurry-buttons.patch
blob: 0286039ddb7b09da780d0277feb57df78051888b (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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
From bd1ba6e539a326585a24fc21d0e27ef2c59e8731 Mon Sep 17 00:00:00 2001
From: Noah Davis <noahadvs@gmail.com>
Date: Wed, 6 Apr 2022 15:08:53 -0400
Subject: [PATCH] PC3 toggle controls: fix odd heights misaligning indicators

BUG: 447977
---
 src/declarativeimports/plasmacomponents3/CheckBox.qml       | 2 +-
 src/declarativeimports/plasmacomponents3/CheckDelegate.qml  | 2 +-
 src/declarativeimports/plasmacomponents3/MenuItem.qml       | 2 +-
 src/declarativeimports/plasmacomponents3/RadioButton.qml    | 2 +-
 src/declarativeimports/plasmacomponents3/RadioDelegate.qml  | 2 +-
 src/declarativeimports/plasmacomponents3/Switch.qml         | 2 +-
 src/declarativeimports/plasmacomponents3/SwitchDelegate.qml | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/declarativeimports/plasmacomponents3/CheckBox.qml b/src/declarativeimports/plasmacomponents3/CheckBox.qml
index 1da39da24..fed972566 100644
--- a/src/declarativeimports/plasmacomponents3/CheckBox.qml
+++ b/src/declarativeimports/plasmacomponents3/CheckBox.qml
@@ -35,7 +35,7 @@ T.CheckBox {
 
     indicator: CheckIndicator {
         x: !control.mirrored ? control.leftPadding : control.width - width - control.rightPadding
-        y: control.topPadding + (control.availableHeight - height) / 2
+        y: control.topPadding + Math.round((control.availableHeight - height) / 2)
         control: control
     }
 
diff --git a/src/declarativeimports/plasmacomponents3/CheckDelegate.qml b/src/declarativeimports/plasmacomponents3/CheckDelegate.qml
index ef965becd..9d241467b 100644
--- a/src/declarativeimports/plasmacomponents3/CheckDelegate.qml
+++ b/src/declarativeimports/plasmacomponents3/CheckDelegate.qml
@@ -47,7 +47,7 @@ T.CheckDelegate {
 
     indicator: CheckIndicator {
         x: control.mirrored ? control.leftPadding : control.width - width - control.rightPadding
-        y: control.topPadding + (control.availableHeight - height) / 2
+        y: control.topPadding + Math.round((control.availableHeight - height) / 2)
 
         control: control
     }
diff --git a/src/declarativeimports/plasmacomponents3/MenuItem.qml b/src/declarativeimports/plasmacomponents3/MenuItem.qml
index 16f2a5e36..964c5930d 100644
--- a/src/declarativeimports/plasmacomponents3/MenuItem.qml
+++ b/src/declarativeimports/plasmacomponents3/MenuItem.qml
@@ -81,7 +81,7 @@ T.MenuItem {
 
     indicator: Loader {
         x: controlRoot.mirrored ? controlRoot.width - width - controlRoot.rightPadding : controlRoot.leftPadding
-        y: controlRoot.topPadding + (controlRoot.availableHeight - height) / 2
+        y: controlRoot.topPadding + Math.round((controlRoot.availableHeight - height) / 2)
 
         visible: controlRoot.checkable
         sourceComponent: controlRoot.autoExclusive ? radioComponent : checkComponent
diff --git a/src/declarativeimports/plasmacomponents3/RadioButton.qml b/src/declarativeimports/plasmacomponents3/RadioButton.qml
index 7eeee3f9b..0b7a19894 100644
--- a/src/declarativeimports/plasmacomponents3/RadioButton.qml
+++ b/src/declarativeimports/plasmacomponents3/RadioButton.qml
@@ -32,7 +32,7 @@ T.RadioButton {
 
     indicator: RadioIndicator {
         x: !control.mirrored ? control.leftPadding : control.width - width - control.rightPadding
-        y: control.topPadding + (control.availableHeight - height) / 2
+        y: control.topPadding + Math.round((control.availableHeight - height) / 2)
         control: control
     }
 
diff --git a/src/declarativeimports/plasmacomponents3/RadioDelegate.qml b/src/declarativeimports/plasmacomponents3/RadioDelegate.qml
index e25f28cc3..a915a4eac 100644
--- a/src/declarativeimports/plasmacomponents3/RadioDelegate.qml
+++ b/src/declarativeimports/plasmacomponents3/RadioDelegate.qml
@@ -47,7 +47,7 @@ T.RadioDelegate {
 
     indicator: RadioIndicator {
         x: control.mirrored ? control.leftPadding : control.width - width - control.rightPadding
-        y: control.topPadding + (control.availableHeight - height) / 2
+        y: control.topPadding + Math.round((control.availableHeight - height) / 2)
 
         control: control
     }
diff --git a/src/declarativeimports/plasmacomponents3/Switch.qml b/src/declarativeimports/plasmacomponents3/Switch.qml
index 32ef1274b..98de41388 100644
--- a/src/declarativeimports/plasmacomponents3/Switch.qml
+++ b/src/declarativeimports/plasmacomponents3/Switch.qml
@@ -32,7 +32,7 @@ T.Switch {
 
     indicator: SwitchIndicator {
         x: !control.mirrored ? control.leftPadding : control.width - width - control.rightPadding
-        y: control.topPadding + (control.availableHeight - height) / 2
+        y: control.topPadding + Math.round((control.availableHeight - height) / 2)
         control: control
     }
 
diff --git a/src/declarativeimports/plasmacomponents3/SwitchDelegate.qml b/src/declarativeimports/plasmacomponents3/SwitchDelegate.qml
index e6adf9a6e..0f3db70de 100644
--- a/src/declarativeimports/plasmacomponents3/SwitchDelegate.qml
+++ b/src/declarativeimports/plasmacomponents3/SwitchDelegate.qml
@@ -45,7 +45,7 @@ T.SwitchDelegate {
 
     indicator: SwitchIndicator {
         x: control.mirrored ? control.leftPadding : control.width - width - control.rightPadding
-        y: control.topPadding + (control.availableHeight - height) / 2
+        y: control.topPadding + Math.round((control.availableHeight - height) / 2)
 
         control: control
     }
-- 
GitLab