mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-01 20:31:27 +00:00
Prospective fix for Qt style’s slider’s release callback
Like in the Slint impl, invoke only if previously pressed.
This commit is contained in:
parent
d03a6f0071
commit
09cfd067dd
1 changed files with 3 additions and 1 deletions
|
|
@ -217,8 +217,10 @@ impl Item for NativeSlider {
|
|||
InputEventResult::GrabMouse
|
||||
}
|
||||
MouseEvent::Exit | MouseEvent::Released { button: PointerEventButton::Left, .. } => {
|
||||
if data.pressed != 0 {
|
||||
Self::FIELD_OFFSETS.released.apply_pin(self).call(&(self.value(),));
|
||||
}
|
||||
data.pressed = 0;
|
||||
Self::FIELD_OFFSETS.released.apply_pin(self).call(&(self.value(),));
|
||||
InputEventResult::EventAccepted
|
||||
}
|
||||
MouseEvent::Moved { position: pos } => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue