Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
KScreen
Commits
bc87268c
Commit
bc87268c
authored
Apr 16, 2021
by
Xaver Hugl
Browse files
Fix valueFromText for scale spinboxes
parent
5245a9f8
Changes
2
Hide whitespace changes
Inline
Side-by-side
kcm/package/contents/ui/OutputPanel.qml
View file @
bc87268c
...
...
@@ -89,7 +89,7 @@ ColumnLayout {
return
i18nc
(
"
Global scale factor expressed in percentage form
"
,
"
%1%
"
,
parseFloat
(
value
*
1.0
/
factor
*
100.0
));
}
valueFromText
:
function
(
text
,
locale
)
{
return
Number
.
fromLocaleString
(
locale
,
text
)
*
factor
/
100.0
return
Number
.
fromLocaleString
(
locale
,
text
.
replace
(
"
%
"
,
""
)
)
*
factor
/
100.0
}
onValueModified
:
element
.
scale
=
realValue
}
...
...
kcm/package/contents/ui/Panel.qml
View file @
bc87268c
...
...
@@ -119,7 +119,7 @@ ColumnLayout {
return
i18nc
(
"
Global scale factor expressed in percentage form
"
,
"
%1%
"
,
parseFloat
(
value
*
1.0
/
factor
*
100.0
));
}
valueFromText
:
function
(
text
,
locale
)
{
return
Number
.
fromLocaleString
(
locale
,
text
)
*
factor
/
100.0
return
Number
.
fromLocaleString
(
locale
,
text
.
replace
(
"
%
"
,
""
)
)
*
factor
/
100.0
}
onValueModified
:
{
kcm
.
globalScale
=
realValue
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment