Skip to content

Commit 80eafab

Browse files
authored
Merge pull request #773 from multiplex55/codex/implement-mouse-gestures-enhancements
Persist mouse-gesture binding selection, add numeric chooser and wheel-gate
2 parents 0e50865 + 43b4d34 commit 80eafab

4 files changed

Lines changed: 402 additions & 31 deletions

File tree

src/gui/mouse_gesture_settings_dialog.rs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,28 @@ impl MouseGestureSettingsDialog {
173173
.changed();
174174
});
175175

176+
ui.horizontal(|ui| {
177+
ui.label("Wheel cycling");
178+
egui::ComboBox::from_id_source("mg_settings_wheel_cycle_gate")
179+
.selected_text(wheel_cycle_gate_label(self.settings.wheel_cycle_gate))
180+
.show_ui(ui, |ui| {
181+
changed |= ui
182+
.selectable_value(
183+
&mut self.settings.wheel_cycle_gate,
184+
crate::mouse_gestures::service::WheelCycleGate::Deadzone,
185+
"After deadzone",
186+
)
187+
.changed();
188+
changed |= ui
189+
.selectable_value(
190+
&mut self.settings.wheel_cycle_gate,
191+
crate::mouse_gestures::service::WheelCycleGate::Shift,
192+
"Shift + wheel",
193+
)
194+
.changed();
195+
});
196+
});
197+
176198
ui.separator();
177199

178200
ui.horizontal(|ui| {
@@ -275,3 +297,10 @@ fn no_match_behavior_label(value: crate::mouse_gestures::service::NoMatchBehavio
275297
crate::mouse_gestures::service::NoMatchBehavior::ShowNoMatchHint => "Show no-match hint",
276298
}
277299
}
300+
301+
fn wheel_cycle_gate_label(value: crate::mouse_gestures::service::WheelCycleGate) -> &'static str {
302+
match value {
303+
crate::mouse_gestures::service::WheelCycleGate::Deadzone => "After deadzone",
304+
crate::mouse_gestures::service::WheelCycleGate::Shift => "Shift + wheel",
305+
}
306+
}

0 commit comments

Comments
 (0)