logarithmic scaling added; missing the step fn for now

This commit is contained in:
Julius Schmitt
2026-01-22 20:44:40 +01:00
parent fb3f9d75dc
commit 969ba9bcb5
4 changed files with 50 additions and 30 deletions

View File

@@ -82,7 +82,7 @@ impl eframe::App for KnobDemo {
.enumerate()
{
ui.vertical(|ui| {
let mut knob = Knob::new(&mut self.values[i], 0.0, 1.0, *config)
let mut knob = Knob::new(&mut self.values[i], 0., 3., *config)
.with_label(*label, LabelPosition::Bottom)
.with_background_arc(self.show_bg_arc)
.with_show_filled_segments(self.show_filled)
@@ -90,6 +90,7 @@ impl eframe::App for KnobDemo {
.with_step(self.use_step.then_some(0.02))
.with_double_click_reset(0.5)
.with_middle_scroll();
//.with_logarithmic_scaling();
if *label == "Wiper, Sweep" {
knob = knob.with_sweep_range(0.25, 0.75).with_size(50.0);