Also reset Vizia widgets on right click
Because why choose. Right click, Ctrl+click, and double click all do the same thing now.
This commit is contained in:
parent
d97e5ccd30
commit
c05bc21581
|
@ -469,8 +469,8 @@ impl View for ParamSlider {
|
||||||
self.text_input_active = true;
|
self.text_input_active = true;
|
||||||
cx.set_active(true);
|
cx.set_active(true);
|
||||||
} else if cx.modifiers.command() {
|
} else if cx.modifiers.command() {
|
||||||
// Ctrl+Click and double click should reset the parameter instead of initiating
|
// Ctrl+Click, double click, and right clicks should reset the parameter instead
|
||||||
// a drag operation
|
// of initiating a drag operation
|
||||||
self.param_base.begin_set_parameter(cx);
|
self.param_base.begin_set_parameter(cx);
|
||||||
self.param_base
|
self.param_base
|
||||||
.set_normalized_value(cx, self.param_base.default_normalized_value());
|
.set_normalized_value(cx, self.param_base.default_normalized_value());
|
||||||
|
@ -501,9 +501,12 @@ impl View for ParamSlider {
|
||||||
|
|
||||||
meta.consume();
|
meta.consume();
|
||||||
}
|
}
|
||||||
WindowEvent::MouseDoubleClick(MouseButton::Left) => {
|
WindowEvent::MouseDoubleClick(MouseButton::Left)
|
||||||
// Ctrl+Click and double click should reset the parameter instead of initiating
|
| WindowEvent::MouseDown(MouseButton::Right)
|
||||||
// a drag operation
|
| WindowEvent::MouseDoubleClick(MouseButton::Right)
|
||||||
|
| WindowEvent::MouseTripleClick(MouseButton::Right) => {
|
||||||
|
// Ctrl+Click, double click, and right clicks should reset the parameter instead of
|
||||||
|
// initiating a drag operation
|
||||||
self.param_base.begin_set_parameter(cx);
|
self.param_base.begin_set_parameter(cx);
|
||||||
self.param_base
|
self.param_base
|
||||||
.set_normalized_value(cx, self.param_base.default_normalized_value());
|
.set_normalized_value(cx, self.param_base.default_normalized_value());
|
||||||
|
|
|
@ -398,8 +398,8 @@ impl View for XyPad {
|
||||||
self.text_input_active = true;
|
self.text_input_active = true;
|
||||||
cx.set_active(true);
|
cx.set_active(true);
|
||||||
} else if cx.modifiers.command() {
|
} else if cx.modifiers.command() {
|
||||||
// Ctrl+Click and double click should reset the parameter instead of initiating
|
// Ctrl+Click, double click, and right clicks should reset the parameter instead
|
||||||
// a drag operation
|
// of initiating a drag operation
|
||||||
self.begin_set_parameters(cx);
|
self.begin_set_parameters(cx);
|
||||||
self.reset_parameters(cx);
|
self.reset_parameters(cx);
|
||||||
self.end_set_parameters(cx);
|
self.end_set_parameters(cx);
|
||||||
|
@ -432,9 +432,12 @@ impl View for XyPad {
|
||||||
|
|
||||||
meta.consume();
|
meta.consume();
|
||||||
}
|
}
|
||||||
WindowEvent::MouseDoubleClick(MouseButton::Left) => {
|
WindowEvent::MouseDoubleClick(MouseButton::Left)
|
||||||
// Ctrl+Click and double click should reset the parameters instead of initiating a
|
| WindowEvent::MouseDown(MouseButton::Right)
|
||||||
// drag operation
|
| WindowEvent::MouseDoubleClick(MouseButton::Right)
|
||||||
|
| WindowEvent::MouseTripleClick(MouseButton::Right) => {
|
||||||
|
// Ctrl+Click, double click, and right clicks should reset the parameter instead of
|
||||||
|
// initiating a drag operation
|
||||||
self.begin_set_parameters(cx);
|
self.begin_set_parameters(cx);
|
||||||
self.reset_parameters(cx);
|
self.reset_parameters(cx);
|
||||||
self.end_set_parameters(cx);
|
self.end_set_parameters(cx);
|
||||||
|
|
Loading…
Reference in a new issue