Compare commits

...

2 Commits

2 changed files with 5 additions and 3 deletions

View File

@ -407,12 +407,14 @@ RibbonWindow {
validator: DoubleValidator {
bottom: Math.min(spinbox.from, spinbox.to)
top: Math.max(spinbox.from, spinbox.to)
decimals: 2
notation: DoubleValidator.StandardNotation
}
textFromValue: function(value, locale) {
return Number(value / 100).toLocaleString(locale, 'f', 2)
}
valueFromText: function(text, locale) {
return Number.fromLocaleString(locale, text) * 100
return Math.round(Number.fromLocaleString(locale, text) * 100)
}
}
}

View File

@ -5,12 +5,12 @@
#include <QtQuick/QQuickWindow>
#define STR(x) #x
#define JOIN(a,b,c) STR(a.b.c)
#define VER_JOIN(x) JOIN x
#define VER_JOIN(x) JOIN(x)
RibbonUI::RibbonUI(QQuickItem *parent)
: QQuickItem(parent)
{
_version = VER_JOIN((RIBBONUI_VERSION));
_version = VER_JOIN(RIBBONUI_VERSION);
_qt_version = QString(qVersion()).replace('.',"").toInt();
_is_win11 = QOperatingSystemVersion::current() >= QOperatingSystemVersion(QOperatingSystemVersion::Windows, 10, 0, 22000);
}