Procházet zdrojové kódy

Replaced dialog anchors with coordinates

Malte Veerman před 6 roky
rodič
revize
6515943d9f

+ 4 - 2
fancontrol-gui/package/contents/ui/Application.qml

@@ -169,7 +169,8 @@ Kirigami.ApplicationWindow {
         id: errorDialog
 
         visible: false
-        anchors.centerIn: window.contentItem
+        x: (window.width - width) / 2
+        y: (window.height - height) / 2
     }
 
     Dialog {
@@ -181,7 +182,8 @@ Kirigami.ApplicationWindow {
         modal: true
         title: i18n("Unsaved changes")
         standardButtons: Dialog.Cancel | Dialog.Discard | Dialog.Apply
-        anchors.centerIn: window.contentItem
+        x: (window.width - width) / 2
+        y: (window.height - height) / 2
 
         onRejected: close()
         onDiscarded: {

+ 2 - 1
fancontrol-gui/package/contents/ui/PwmFansTab.qml

@@ -118,6 +118,7 @@ Kirigami.Page {
 
         visible: false
         modal: true
-        anchors.centerIn: parent
+        x: (root.width - width) / 2
+        y: (root.height - height) / 2
     }
 }

+ 2 - 1
import/qml/ProfilesDialog.qml

@@ -111,7 +111,8 @@ Dialog {
         title: i18n("New profile's name")
         standardButtons: Dialog.Ok | Dialog.Cancel
         visible: false
-        anchors.centerIn: parent
+        x: (parent.width - width) / 2
+        y: (parent.height - height) / 2
 
         onAccepted: {
             Fancontrol.Base.saveProfile(newProfileNameField.text);

+ 2 - 1
kcm/package/contents/ui/KCM.qml

@@ -239,6 +239,7 @@ Kirigami.Page {
         id: errorDialog
 
         modal: true
-        anchors.centerIn: root
+        x: (root.width - width) / 2
+        y: (root.height - height) / 2
     }
 }