2
0
Эх сурвалжийг харах

changed cursor when moving points

Malte Veerman 9 жил өмнө
parent
commit
510da10038

+ 7 - 5
package/contents/ui/Application.qml

@@ -17,12 +17,14 @@
  *
  */
 
+
 import QtQuick 2.4
 import QtQuick.Controls 1.3
 import QtQuick.Dialogs 1.2
 import QtQuick.Layouts 1.1
 
-ApplicationWindow {    
+
+ApplicationWindow {
     id: window
     title: i18n("Fancontrol-GUI")
     width: 1024
@@ -34,7 +36,7 @@ ApplicationWindow {
             title: i18n("File")
             MenuItem { action: loadAction }
             MenuItem { action: saveAction }
-            MenuItem { 
+            MenuItem {
                 text: i18n("Save configuration file as")
                 onTriggered: saveFileDialog.open()
                 shortcut: StandardKey.SaveAs
@@ -111,7 +113,7 @@ ApplicationWindow {
             }
         }
     }
-    
+
     ErrorDialog {
         id: errorDialog
         visible: !!base.loader.error
@@ -119,7 +121,7 @@ ApplicationWindow {
         text: base.loader.error
         onTextChanged: show()
     }
-    
+
     Action {
         id: loadAction
         text: i18n("Load configuration file")
@@ -136,7 +138,7 @@ ApplicationWindow {
         tooltip: i18n("Save configuration file") + " (" + base.loader.configUrl.toString() + ")"
         shortcut: StandardKey.Save
     }
-    
+
     FileDialog {
         id: openFileDialog
         title: i18n("Please choose a configuration file")

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

@@ -17,14 +17,16 @@
  *
  */
 
+
 import QtQuick 2.4
 import QtQuick.Controls 1.2
 import QtQuick.Layouts 1.1
 import "../scripts/arrayfunctions.js" as ArrayFunctions
 
+
 ColumnLayout {
     property QtObject loader
-    
+
     anchors.fill: parent
     anchors.topMargin: 5
 
@@ -52,7 +54,7 @@ ColumnLayout {
             }
         }
     }
-    
+
     SystemPalette {
         id: palette
     }

+ 5 - 3
package/contents/ui/ErrorDialog.qml

@@ -17,20 +17,22 @@
  *
  */
 
+
 import QtQuick 2.4
 import QtQuick.Dialogs 1.2
 import QtQuick.Controls 1.2
 
+
 Dialog {
     property alias text: text.text
-    
+
     title: i18n("Error")
     width: text.implicitWidth + 20
     standardButtons: StandardButton.Close
     onRejected: close()
-    
+
     Label {
         id: text
         anchors.centerIn: parent
     }
-}
+}

+ 22 - 21
package/contents/ui/KCM.qml

@@ -26,29 +26,30 @@ import org.kde.kcm 1.0
 import "../scripts/arrayfunctions.js" as ArrayFunctions
 import "../scripts/units.js" as Units
 
+
 Item {
     property QtObject base: kcm.base
     property var locale: Qt.locale()
     property real textWidth: 0
-    
+
     id: root
     implicitWidth: 1024
     implicitHeight: 768
-       
+
     ColumnLayout {
         id: noFansInfo
         width: parent.width
         anchors.verticalCenter: parent.verticalCenter
         spacing: 20
         visible: kcm.loader.allPwmFans.length == 0
-        
+
         Label {
             Layout.alignment: Qt.AlignCenter
             text: i18n("There are no pwm capable fans in your system.")
             font.pointSize: 14
             font.bold: true
         }
-        
+
         Button {
             Layout.alignment: Qt.AlignCenter
             text: i18n("Detect fans")
@@ -56,7 +57,7 @@ Item {
             onClicked: kcm.loader.detectSensors()
         }
     }
-    
+
     CheckBox {
         id: enabledBox
         visible: kcm.loader.allPwmFans.length > 0
@@ -64,22 +65,22 @@ Item {
         text: i18n("Control fans manually")
         checked: kcm.manualControl
         onCheckedChanged: kcm.manualControl = checked
-        
+
         Connections {
             target: kcm
             onManualControlChanged: enabledBox.checked = kcm.manualControl
         }
     }
-        
+
     ColumnLayout {
         width: parent.width
         anchors.bottom: parent.bottom
         anchors.top: enabledBox.bottom
         visible: enabledBox.checked
 
-        RowLayout {  
+        RowLayout {
             visible: enabledBox.checked && kcm.loader.allPwmFans.length > 0
-            
+
             Label {
                 text: i18n("Fan:")
                 Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
@@ -106,7 +107,7 @@ Item {
                 onClicked: kcm.loader.detectSensors()
             }
         }
-        
+
         Loader {
             Layout.fillWidth: true
             Layout.fillHeight: true
@@ -125,7 +126,7 @@ Item {
                 }
             }
         }
-        
+
         Row {
             property bool expanded: false
 
@@ -147,7 +148,7 @@ Item {
             anchors.fill: expand
             onClicked: expand.expanded = expand.expanded ? false : true
         }
-        
+
         RowLayout {
             visible: expand.expanded
 
@@ -185,7 +186,7 @@ Item {
                 maximumValue: maxTempBox.value
                 minimumValue: Units.fromKelvin(0, base.unit)
                 value: Units.fromCelsius(base.minTemp, base.unit)
-                suffix: base.unit == 0 ? i18n("°C") : base.unit == 1 ? i18n("K") : i18n("°F") 
+                suffix: base.unit == 0 ? i18n("°C") : base.unit == 1 ? i18n("K") : i18n("°F")
                 onValueChanged: base.minTemp = value
             }
         }
@@ -210,7 +211,7 @@ Item {
                 suffix: base.unit == 0 ? i18n("°C") : base.unit == 1 ? i18n("K") : i18n("°F")
                 onValueChanged: base.maxTemp = value
             }
-        }        
+        }
         RowLayout {
             visible: expand.expanded
 
@@ -231,7 +232,7 @@ Item {
         }
         RowLayout {
             visible: expand.expanded
-            
+
             Label {
                 Layout.preferredWidth: root.textWidth
                 clip: true
@@ -247,11 +248,11 @@ Item {
                 onTextChanged: base.configUrl = text
             }
             Button {
-                action: loadAction 
+                action: loadAction
             }
         }
     }
-    
+
     Action {
         id: loadAction
         iconName: "document-open"
@@ -259,19 +260,19 @@ Item {
         tooltip: i18n("Load configuration file")
         shortcut: StandardKey.Open
     }
-    
+
     FileDialog {
         id: openFileDialog
         title: i18n("Please choose a configuration file")
         folder: "file:///etc"
         selectExisting: true
         selectMultiple: false
-        
+
         onAccepted: {
             base.configUrl = fileUrl;
         }
     }
-    
+
     ErrorDialog {
         id: errorDialog
         modality: Qt.ApplicationModal
@@ -281,4 +282,4 @@ Item {
         target: base.loader
         onCriticalError: errorDialog.open()
     }
-}
+}

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

@@ -17,9 +17,11 @@
  *
  */
 
+
 import QtQuick 2.4
 import QtQuick.Layouts 1.1
 
+
 FocusScope {
     property alias text: textField.text
     property alias font: textField.font
@@ -33,7 +35,7 @@ FocusScope {
     id: root
     implicitHeight: textField.implicitHeight + margin*2
     implicitWidth: textField.implicitWidth + margin*2
-    
+
     onValueChanged: {
         if (textField.text != value) {
             textField.text = value;

+ 2 - 0
package/contents/ui/PwmFan.qml

@@ -17,6 +17,7 @@
  *
  */
 
+
 import QtQuick 2.4
 import QtQuick.Controls 1.4
 import QtQuick.Layouts 1.1
@@ -26,6 +27,7 @@ import "../scripts/units.js" as Units
 import "../scripts/coordinates.js" as Coordinates
 import "../scripts/colors.js" as Colors
 
+
 Rectangle {
     property QtObject fan
     property QtObject loader

+ 2 - 0
package/contents/ui/PwmFansTab.qml

@@ -17,11 +17,13 @@
  *
  */
 
+
 import QtQuick 2.4
 import QtQuick.Controls 1.4
 import QtQuick.Layouts 1.2
 import "../scripts/arrayfunctions.js" as ArrayFunctions
 
+
 ColumnLayout {
     property QtObject baseObject
     property QtObject loader: baseObject ? baseObject.loader : null

+ 6 - 3
package/contents/ui/PwmPoint.qml

@@ -17,13 +17,15 @@
  *
  */
 
+
 import QtQuick 2.4
-import QtQuick.Layouts 1.2
 import QtQuick.Controls 1.4
-import QtQml 2.2
 import "../scripts/units.js" as Units
 
+
 Rectangle {
+    id: root
+
     property Item background: parent
     property point center: Qt.point(x + width / 2, y + height / 2);
     readonly property real centerX: x + width / 2
@@ -35,7 +37,6 @@ Rectangle {
 
     signal positionChanged()
 
-    id: root
     width: size
     height: size
     radius: size / 2
@@ -48,8 +49,10 @@ Rectangle {
 
     MouseArea {
         id: pwmMouse
+
         anchors.fill: parent
         hoverEnabled: root.enabled ? true : false
+        cursorShape: containsPress || drag.active ? Qt.DragMoveCursor : Qt.PointingHandCursor
         drag.target: root
         drag.axis: Drag.XAndYAxis
         drag.smoothed: false

+ 4 - 2
package/contents/ui/SensorsTab.qml

@@ -17,14 +17,16 @@
  *
  */
 
+
 import QtQuick 2.4
 import QtQuick.Controls 1.2
 import QtQuick.Layouts 1.1
 import "../scripts/arrayfunctions.js" as ArrayFunctions
 
+
 RowLayout {
     property QtObject loader
-    
+
     id: root
     anchors.fill: parent
     anchors.margins: 2
@@ -101,7 +103,7 @@ RowLayout {
             }
         }
     }
-    
+
     SystemPalette {
         id: palette
     }

+ 5 - 3
package/contents/ui/SettingsTab.qml

@@ -17,6 +17,7 @@
  *
  */
 
+
 import QtQuick 2.4
 import QtQuick.Layouts 1.1
 import QtQuick.Controls 1.2
@@ -24,6 +25,7 @@ import QtQml 2.2
 import "../scripts/arrayfunctions.js" as ArrayFunctions
 import "../scripts/units.js" as Units
 
+
 Item {
     property QtObject gui
     property QtObject systemdCom: gui && gui.hasSystemdCommunicator() ? gui.systemdCom : null
@@ -79,7 +81,7 @@ Item {
                 maximumValue: maxTempBox.value
                 minimumValue: Units.fromKelvin(0, gui.unit)
                 value: Units.fromCelsius(gui.minTemp, gui.unit)
-                suffix: gui.unit == 0 ? i18n("°C") : gui.unit == 1 ? i18n("K") : i18n("°F") 
+                suffix: gui.unit == 0 ? i18n("°C") : gui.unit == 1 ? i18n("K") : i18n("°F")
                 onValueChanged: gui.minTemp = value
             }
         }
@@ -104,7 +106,7 @@ Item {
                 suffix: gui.unit == 0 ? i18n("°C") : gui.unit == 1 ? i18n("K") : i18n("°F")
                 onValueChanged: gui.maxTemp = value
             }
-        }        
+        }
         Loader {
             active: systemdCom
             sourceComponent: RowLayout {
@@ -148,4 +150,4 @@ Item {
             }
         }
     }
-}
+}