|
@@ -210,7 +210,7 @@ Rectangle {
|
|
|
var c = bgCanvas.getContext("2d");
|
|
|
c.clearRect(0, 0, width, height);
|
|
|
|
|
|
- if (!root.fan) {
|
|
|
+ if (!fan || !fan.hasTemp) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -222,7 +222,7 @@ Rectangle {
|
|
|
c.strokeStyle = gradient;
|
|
|
c.lineJoin = "round";
|
|
|
c.beginPath();
|
|
|
- if (fanOffCheckBox.checked) {
|
|
|
+ if (fan.minPwm == 0) {
|
|
|
c.moveTo(stopPoint.centerX, height);
|
|
|
} else {
|
|
|
c.moveTo(0, stopPoint.centerY);
|
|
@@ -233,7 +233,7 @@ Rectangle {
|
|
|
c.lineTo(width, maxPoint.centerY);
|
|
|
c.stroke();
|
|
|
c.lineTo(width, height);
|
|
|
- if (fanOffCheckBox.checked) {
|
|
|
+ if (fan.minPwm == 0) {
|
|
|
c.lineTo(stopPoint.centerX, height);
|
|
|
} else {
|
|
|
c.lineTo(0, height);
|
|
@@ -299,7 +299,7 @@ Rectangle {
|
|
|
id: stopPoint
|
|
|
color: !!fan ? fan.hasTemp ? "blue" : Qt.tint(graph.pal.light, Qt.rgba(0, 0, 1, 0.5)) : "transparent"
|
|
|
size: graph.fontSize
|
|
|
- enabled: !!fan ? fan.hasTemp : false
|
|
|
+ visible: !!fan ? fan.hasTemp : false
|
|
|
drag.maximumX: Math.min(background.scaleX(background.scaleTemp(maxPoint.x)-1), maxPoint.x-1)
|
|
|
drag.minimumY: Math.max(background.scaleY(background.scalePwm(maxPoint.y)-1), maxPoint.y+1)
|
|
|
x: !!fan && fan.hasTemp ? background.scaleX(MoreMath.bound(root.minTemp, fan.minTemp, root.maxTemp)) - width/2 : -width/2
|
|
@@ -324,7 +324,7 @@ Rectangle {
|
|
|
id: maxPoint
|
|
|
color: !!fan ? fan.hasTemp ? "red" : Qt.tint(graph.pal.light, Qt.rgba(1, 0, 0, 0.5)) : "transparent"
|
|
|
size: graph.fontSize
|
|
|
- enabled: !!fan ? fan.hasTemp : false
|
|
|
+ visible: !!fan ? fan.hasTemp : false
|
|
|
drag.minimumX: Math.max(background.scaleX(background.scaleTemp(stopPoint.x)+1), stopPoint.x+1)
|
|
|
drag.maximumY: Math.min(background.scaleY(background.scalePwm(stopPoint.y)+1), stopPoint.y-1)
|
|
|
x: !!fan && fan.hasTemp ? background.scaleX(MoreMath.bound(root.minTemp, fan.maxTemp, root.maxTemp)) - width/2 : background.width - width/2
|