Commit cd14bbc9 authored by Nate Graham's avatar Nate Graham 💤
Browse files

[KCM/Night Color] Use a spinbox with an appropriate suffix for the duration

Summary:
Currently it's a text box that doesn't give you any indication of what the units are.

BUG:413249
FIXED-IN: 5.18.0

Test Plan: {F7639735, size=full}

Reviewers: #vdg, #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: davidedmundson, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D24813
parent ae555600
......@@ -299,16 +299,22 @@ KCM.SimpleKCM {
}
}
NumberField {
QQC2.SpinBox {
id: transTimeField
// Match width of other text fields
Layout.minimumWidth: 200
Kirigami.FormData.label: i18n("Transition duration:")
backend: cA.transitionTimeStaged
onBackendChanged: {cA.transitionTimeStaged = backend;
from: 1
to: 600 // less than 12 hours (in minutes: 720)
value: cA.transitionTimeStaged
editable: true
onValueModified: {
cA.transitionTimeStaged = value;
calcNeedsSave();
}
inputMethodHints: Qt.ImhDigitsOnly
validator: IntValidator {bottom: 1; top: 600;} // less than 12 hours (in minutes: 720)
textFromValue: function(value, locale) {
return i18np("%1 minute", "%1 minutes", value)
}
QQC2.ToolTip {
text: i18n("Input minutes - min. 1, max. 600")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment