Allow releasing drags outside of slider area
This commit is contained in:
parent
9bfc44d787
commit
82c33da022
|
@ -161,7 +161,7 @@ impl<'a, P: Param> Widget<ParamMessage, Renderer> for ParamSlider<'a, P> {
|
|||
}
|
||||
Event::Mouse(mouse::Event::ButtonReleased(mouse::Button::Left))
|
||||
| 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()));
|
||||
|
||||
self.state.drag_active = false;
|
||||
|
|
Loading…
Reference in a new issue