Commit f8add1d7 authored by Karel Slaný's avatar Karel Slaný

Using onValueModified in combination with SpinBoxZeroMax.

Using onValueModified instead of onValueChanged to prevent unwanted
value modifications.
parent 36665c8a
......@@ -21,7 +21,7 @@
* the two.
*/
import QtQuick.Controls 2.0
import QtQuick.Controls 2.2
SpinBox {
/* Must be a non-decreasing list ending with infinity. */
......
......@@ -343,7 +343,7 @@ Item {
/* Must be a non-decreasing list ending with infinity. */
items: [15, 30, 60, 90, 120, 150, 180, qsTr("don't lock")]
dfltIdx: 0
onValueChanged: {
onValueModified: {
/* Enable accept button. Always visible? */
acceptElement.visible = val() != settings.inactivityInterval()
}
......
......@@ -96,7 +96,7 @@ Item {
/* Must be a non-decreasing list ending with infinity. */
items: [90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155, 160, 165, 170, 175, 180, qsTr("don't delete")]
dfltIdx: 0
onValueChanged: settings.setMessageLifeDays(messageLifeSpinBox.val())
onValueModified: settings.setMessageLifeDays(messageLifeSpinBox.val())
}
Text {
color: datovkaPalette.mid
......@@ -121,7 +121,7 @@ Item {
/* Must be a non-decreasing list ending with infinity. */
items: [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, qsTr("like messages")]
dfltIdx: 1
onValueChanged: settings.setAttachmentLifeDays(attachLifeSpinBox.val())
onValueModified: settings.setAttachmentLifeDays(attachLifeSpinBox.val())
}
Text {
color: datovkaPalette.mid
......@@ -146,7 +146,7 @@ Item {
from: 0
to: 1000
stepSize: 100
onValueChanged: settings.setZfoDbSizeMBs(zfoDbSizeSpinBox.value)
onValueModified: settings.setZfoDbSizeMBs(zfoDbSizeSpinBox.value)
}
Text {
color: datovkaPalette.mid
......
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