Allow releasing drags outside of slider area
This commit is contained in:
parent
9bfc44d787
commit
82c33da022
1 changed files with 1 additions and 1 deletions
|
@ -161,7 +161,7 @@ impl<'a, P: Param> Widget<ParamMessage, Renderer> for ParamSlider<'a, P> {
|
||||||
}
|
}
|
||||||
Event::Mouse(mouse::Event::ButtonReleased(mouse::Button::Left))
|
Event::Mouse(mouse::Event::ButtonReleased(mouse::Button::Left))
|
||||||
| Event::Touch(touch::Event::FingerLifted { .. } | touch::Event::FingerLost { .. }) => {
|
| Event::Touch(touch::Event::FingerLifted { .. } | touch::Event::FingerLost { .. }) => {
|
||||||
if bounds.contains(cursor_position) {
|
if self.state.drag_active {
|
||||||
shell.publish(ParamMessage::EndSetParameter(self.param.as_ptr()));
|
shell.publish(ParamMessage::EndSetParameter(self.param.as_ptr()));
|
||||||
|
|
||||||
self.state.drag_active = false;
|
self.state.drag_active = false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue