Merge pull request #2058

247f129 Use Slider.onMoved for inactivity slider, remove Timer (xmrdsc)
This commit is contained in:
luigi1111 2019-04-25 15:26:19 -05:00
commit 5887f87677
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010

View File

@ -160,17 +160,8 @@ Rectangle {
color: parent.pressed ? "#f0f0f0" : "#f6f6f6"
border.color: MoneroComponents.Style.grey
}
}
Timer {
// @TODO: Slider.onMoved{} is available in Qt > 5.9, use a hacky timer for now
id: userInactivitySliderTimer
interval: 1000; running: false; repeat: true
onTriggered: {
if(persistentSettings.lockOnUserInActivityInterval != userInactivitySlider.value) {
persistentSettings.lockOnUserInActivityInterval = userInactivitySlider.value;
}
}
onMoved: persistentSettings.lockOnUserInActivityInterval = userInactivitySlider.value;
}
}