From fd2c00af43012a55321154e4e1269c53d4390022 Mon Sep 17 00:00:00 2001 From: Bharadwaj Raju Date: Sun, 7 Aug 2022 19:59:53 +0000 Subject: [PATCH] kcms/nightcolor: Use sensible precision for coordinates Before, NumberField displayed 6 decimal digits for the coordinates, which implies centimeter-scale resolution, which is of course not the case. Now it shows 2 decimal digits, which is reasonable and consistent with the level of precision shown in Automatic mode. --- kcms/nightcolor/package/contents/ui/NumberField.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kcms/nightcolor/package/contents/ui/NumberField.qml b/kcms/nightcolor/package/contents/ui/NumberField.qml index b880cc299..a675e7422 100644 --- a/kcms/nightcolor/package/contents/ui/NumberField.qml +++ b/kcms/nightcolor/package/contents/ui/NumberField.qml @@ -15,10 +15,10 @@ QQC2.TextField { inputMethodHints: Qt.ImhFormattedNumbersOnly - text: backend + text: Math.round(backend * 100)/100; onBackendChanged: { - text = backend; + text = Math.round(backend * 100)/100; } onTextChanged: {