فهرست منبع

fixed some coloring and removed states from PwmFan.qml

Malte Veerman 10 سال پیش
والد
کامیت
e292a8c366

+ 7 - 2
package/contents/ui/ConfigfileTab.qml

@@ -30,13 +30,13 @@ ColumnLayout {
 
     Label {
         anchors.top: parent.top
-        text: loader ? decodeURIComponent(loader.configUrl) : ""
+        text: !!loader ? decodeURIComponent(loader.configUrl) : ""
     }
 
     Rectangle {
         Layout.fillHeight: true
         Layout.fillWidth: true
-
+        color: palette.light
         border.width: 1
         radius: 5
 
@@ -48,7 +48,12 @@ ColumnLayout {
             TextEdit {
                 text: loader ? loader.configFile : ""
                 readOnly: true
+                color: palette.text
             }
         }
     }
+    
+    SystemPalette {
+        id: palette
+    }
 }

+ 2 - 1
package/contents/ui/OptionInput.qml

@@ -45,7 +45,8 @@ FocusScope {
         anchors.fill: parent
         border.width: 1
         radius: 2
-        border.color: enabled ? palette.text : disabledPalette.text
+        color: enabled ? palette.base : disabledPalette.base
+        border.color: enabled ? palette.windowText : disabledPalette.windowText
 
         TextInput {
             id: textField

+ 5 - 31
package/contents/ui/PwmFan.qml

@@ -66,34 +66,6 @@ Rectangle {
         onConfigUrlChanged: update()
     }
 
-    states: [
-        State {
-            name: "minimized"
-
-            PropertyChanges {
-                target: root
-                height: header.height + 2*margin
-            }
-        },
-        State {
-            name: "maximized"
-
-//            PropertyChanges {
-//                target: root
-//                height:
-//            }
-        }
-    ]
-    transitions: Transition {
-        NumberAnimation {
-            target: root
-            property: "height"
-            easing.amplitude: 1.5
-            easing.type: Easing.InOutQuad
-            duration: minimizeDuration
-        }
-    }
-
     SystemPalette {
         id: palette
     }
@@ -116,6 +88,7 @@ Rectangle {
             id: nameField
             Layout.alignment: Qt.AlignTop
             text: fan.name
+            color: palette.text
             onTextChanged: fan.name = text;
             horizontalAlignment: TextEdit.AlignLeft
             wrapMode: TextEdit.Wrap
@@ -270,7 +243,8 @@ Rectangle {
             c.font = canvas.fontSize + "px sans-serif";
 
             c.clearRect(0, 0, width, height);
-            c.fillStyle = palette.base;
+            c.fillStyle = palette.light;
+            c.strokeStyle = palette.text
             c.fillRect(leftPadding, topPadding, plotWidth, plotHeight);
 
             var fillGradient = c.createLinearGradient(0, 0, width, 0);
@@ -306,8 +280,8 @@ Rectangle {
 
             c.textAlign = "right";
             c.textBaseline = "middle";
-            c.strokeStyle = palette.dark;
-            c.fillStyle = palette.dark;
+            c.strokeStyle = palette.text;
+            c.fillStyle = palette.text;
             c.lineWidth = 1;
             c.strokeRect(leftPadding-0.5, topPadding-0.5, plotWidth+0.5, plotHeight+1.5);
             for (var i=0; i<=100; i+=20) {

+ 7 - 1
package/contents/ui/SensorsTab.qml

@@ -31,7 +31,7 @@ RowLayout {
     anchors.topMargin: 10
 
     Repeater {
-        model: loader != null ? loader.hwmons.length : 0
+        model: !!loader ? loader.hwmons.length : 0
 
         Rectangle {
             property QtObject hwmon: loader.hwmons[index]
@@ -40,6 +40,7 @@ RowLayout {
             Layout.preferredWidth: root.width / loader.hwmons.length - root.spacing
             Layout.maximumWidth: 500
             Layout.fillHeight: true
+            color: palette.light
             border.width: 1
             border.color: "black"
             radius: 5
@@ -51,6 +52,7 @@ RowLayout {
                 Label {
                     anchors.horizontalCenter: parent.horizontalCenter
                     text: hwmon.name
+                    font.pointSize: 12
                     horizontalAlignment: Text.horizontalCenter
                 }
 
@@ -99,4 +101,8 @@ RowLayout {
             }
         }
     }
+    
+    SystemPalette {
+        id: palette
+    }
 }