소스 검색

Layout fixes

Malte Veerman 7 년 전
부모
커밋
85249226cd
3개의 변경된 파일6개의 추가작업 그리고 6개의 파일을 삭제
  1. 1 1
      fancontrol-gui/package/contents/ui/ConfigfileTab.qml
  2. 4 4
      fancontrol-gui/package/contents/ui/SensorsTab.qml
  3. 1 1
      import/qml/FanItem.qml

+ 1 - 1
fancontrol-gui/package/contents/ui/ConfigfileTab.qml

@@ -31,7 +31,7 @@ ColumnLayout {
     anchors.margins: 10
 
     Label {
-        anchors.top: parent.top
+        Layout.alignment: Qt.AlignTop
         text: !!loader && loader.configEqualToLoadedFile ? loader.configPath : i18n("New config")
     }
 

+ 4 - 4
fancontrol-gui/package/contents/ui/SensorsTab.qml

@@ -66,15 +66,15 @@ RowLayout {
                         width: parent.width
 
                         Label {
-                            anchors.left: parent.left
                             anchors.leftMargin: root.padding
                             Layout.maximumWidth: parent.width - rpmValue.width - root.padding*2
+                            Layout.alignment: Qt.AlignLeft
                             clip: true
                             text: "Fan " + (index+1) + ":"
                         }
                         Label {
                             id: rpmValue
-                            anchors.right: parent.right
+                            Layout.alignment: Qt.AlignRight
                             anchors.rightMargin: root.padding
                             text: hwmon.fans[index].rpm + " " + i18n("rpm")
                         }
@@ -87,15 +87,15 @@ RowLayout {
                         width: parent.width
 
                         Label {
-                            anchors.left: parent.left
                             anchors.leftMargin: root.padding
                             text: hwmon.temps[index].name + ": "
                             Layout.maximumWidth: parent.width - tempValue.width - root.padding*2
+                            Layout.alignment: Qt.AlignLeft
                             clip: true
                         }
                         Label {
                             id: tempValue
-                            anchors.right: parent.right
+                            Layout.alignment: Qt.AlignRight
                             anchors.rightMargin: root.padding
                             text: Units.fromCelsius(hwmon.temps[index].value, Fancontrol.Base.unit) + " " + i18n(Fancontrol.Base.unit)
                         }

+ 1 - 1
import/qml/FanItem.qml

@@ -456,7 +456,7 @@ Rectangle {
 
                 text: !!fan ? fan.testing ? i18n("Abort test") : i18n("Test start and stop values") : ""
                 iconName: "dialog-password"
-                anchors.right: parent.right
+                Layout.alignment: Qt.AlignRight
                 onClicked: {
                     if (fan.testing) {
                         fan.abortTest();