mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-09 19:32:03 +02:00
Use Slider.onMoved for inactivity slider, remove Timer
This commit is contained in:
parent
19c2208dc4
commit
247f129a24
@ -150,17 +150,8 @@ Rectangle {
|
|||||||
color: parent.pressed ? "#f0f0f0" : "#f6f6f6"
|
color: parent.pressed ? "#f0f0f0" : "#f6f6f6"
|
||||||
border.color: MoneroComponents.Style.grey
|
border.color: MoneroComponents.Style.grey
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Timer {
|
onMoved: persistentSettings.lockOnUserInActivityInterval = userInactivitySlider.value;
|
||||||
// @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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user