Pārlūkot izejas kodu

fixed minor rounding errors in the tooltips

Malte Veerman 10 gadi atpakaļ
vecāks
revīzija
3c45eec8e4
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      package/contents/ui/PwmPoint.qml

+ 2 - 2
package/contents/ui/PwmPoint.qml

@@ -71,14 +71,14 @@ Rectangle {
             Label {
                 id: pwm
                 font.pixelSize: root.size * 1.5
-                text: Number(Math.round(Units.fromCelsius(canvas.scalePwm(root.centerY))) / 2.55).toLocaleString(locale, 'f', 1) + '%'
+                text: Number(Math.round(canvas.scalePwm(root.centerY)) / 2.55).toLocaleString(locale, 'f', 1) + '%'
             }
             Label {
                 property string suffix: (unit == 0) ? "°C" : (unit == 1) ? "K" : "°F"
                 
                 id: temp
                 font.pixelSize: root.size * 1.5
-                text: Math.round(Units.fromCelsius(canvas.scaleTemp(root.centerX), unit)) + suffix                      
+                text: Units.fromCelsius(Math.round(canvas.scaleTemp(root.centerX)), unit) + suffix
             }
         }
     }