Просмотр исходного кода

Made point tooltips be always on top

Malte Veerman 6 лет назад
Родитель
Сommit
bf7ed62c8e
2 измененных файлов с 10 добавлено и 6 удалено
  1. 5 3
      import/qml/PwmPoint.qml
  2. 5 3
      import/qml/StatusPoint.qml

+ 5 - 3
import/qml/PwmPoint.qml

@@ -77,12 +77,14 @@ Rectangle {
     Rectangle {
         id: tooltip
 
-        x: parent.width
-        y: - height
+        parent: root.parent
+        x: root.width + root.x
+        y: root.y - height
+        z: 2
         width: column.width
         height: column.height
         radius: Kirigami.Units.smallSpacing / 2
-        color: Qt.rgba(parent.color.r, parent.color.g, parent.color.b, 0.3)
+        color: Qt.rgba(root.color.r, root.color.g, root.color.b, 0.3)
         visible: root.enabled && (pwmMouse.containsMouse || pwmMouse.drag.active)
 
         Column {

+ 5 - 3
import/qml/StatusPoint.qml

@@ -78,12 +78,14 @@ Rectangle {
     Rectangle {
         id: tooltip
 
-        x: parent.width
-        y: - height
+        parent: root.parent
+        x: root.width + root.x
+        y: root.y - height
+        z: 2
         width: column.width
         height: column.height
         radius: Kirigami.Units.smallSpacing / 2
-        color: Qt.rgba(parent.color.r, parent.color.g, parent.color.b, 0.3)
+        color: Qt.rgba(root.color.r, root.color.g, root.color.b, 0.3)
         visible: root.enabled && pwmMouse.containsMouse
 
         Column {