1
0
Fork 0

Treat triple clicks in Vizia ParamSlider as click

This commit is contained in:
Robbert van der Helm 2022-10-08 15:52:36 +02:00
parent fc55a519fa
commit 3ba62c4aab

View file

@ -413,7 +413,12 @@ impl View for ParamSlider {
});
event.map(|window_event, meta| match window_event {
WindowEvent::MouseDown(MouseButton::Left) => {
WindowEvent::MouseDown(MouseButton::Left)
// Vizia always captures the third mouse click as a triple click. Treating that triple
// click as a regular mouse button makes double click followed by another drag work as
// expected, instead of requiring a delay or an additional click. Double double click
// still won't work.
| WindowEvent::MouseTripleClick(MouseButton::Left) => {
if cx.modifiers.alt() {
// ALt+Click brings up a text entry dialog
self.text_input_active = true;