Changeset View
Changeset View
Standalone View
Standalone View
kcm/package/contents/ui/OutputPanel.qml
Show First 20 Lines • Show All 85 Lines • ▼ Show 20 Line(s) | 78 | Controls.SpinBox { | |||
---|---|---|---|---|---|
86 | to : 3.0 * factor | 86 | to : 3.0 * factor | ||
87 | stepSize: 0.05 * factor | 87 | stepSize: 0.05 * factor | ||
88 | value: element.scale * factor | 88 | value: element.scale * factor | ||
89 | validator: DoubleValidator { | 89 | validator: DoubleValidator { | ||
90 | bottom: Math.min(spinbox.from, spinbox.to) * spinbox.factor | 90 | bottom: Math.min(spinbox.from, spinbox.to) * spinbox.factor | ||
91 | top: Math.max(spinbox.from, spinbox.to) * spinbox.factor | 91 | top: Math.max(spinbox.from, spinbox.to) * spinbox.factor | ||
92 | } | 92 | } | ||
93 | textFromValue: function(value, locale) { | 93 | textFromValue: function(value, locale) { | ||
94 | return parseFloat(value * 1.0 / factor).toFixed(2); | 94 | return i18nc("Global scale factor expressed in percentage form", "%1%", parseFloat(value * 1.0 / factor * 100.0)); | ||
95 | } | 95 | } | ||
96 | valueFromText: function(text, locale) { | 96 | valueFromText: function(text, locale) { | ||
97 | return Number.fromLocaleString(locale, text) * factor | 97 | return Number.fromLocaleString(locale, text) * factor / 100.0 | ||
98 | } | 98 | } | ||
99 | onValueModified: element.scale = realValue | 99 | onValueModified: element.scale = realValue | ||
100 | } | 100 | } | ||
101 | } | 101 | } | ||
102 | 102 | | |||
103 | Controls.ButtonGroup { | 103 | Controls.ButtonGroup { | ||
104 | buttons: orientation.children | 104 | buttons: orientation.children | ||
105 | } | 105 | } | ||
Show All 40 Lines |