added support for using scroll wheel to modify knob value

This commit is contained in:
Maor Malka
2026-01-13 05:57:30 -05:00
parent 4e8975c955
commit 2c5b209571
3 changed files with 22 additions and 1 deletions

View File

@@ -88,7 +88,8 @@ impl eframe::App for KnobDemo {
.with_show_filled_segments(self.show_filled)
.with_colors(self.knob_color, self.line_color, self.text_color)
.with_step(self.use_step.then_some(0.02))
.with_double_click_reset(0.5);
.with_double_click_reset(0.5)
.with_middle_scroll();
if *label == "Wiper, Sweep" {
knob = knob.with_sweep_range(0.25, 0.75).with_size(50.0);