From 5a41ca8fdfb87435926bc5cd5614439e451412b9 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 22 Jul 2020 22:20:48 +0200 Subject: [PATCH] Amend df1e6fda2dbf, limit digits for numeric dB entry --- libs/widgets/barcontroller.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/widgets/barcontroller.cc b/libs/widgets/barcontroller.cc index ca9f3ba5f3..ca013c7e5a 100644 --- a/libs/widgets/barcontroller.cc +++ b/libs/widgets/barcontroller.cc @@ -60,7 +60,11 @@ BarController::BarController (Gtk::Adjustment& adj, Gtk::SpinButton& spinner = _slider.get_spin_button(); spinner.signal_activate().connect (mem_fun (*this, &BarController::entry_activated)); spinner.signal_focus_out_event().connect (mem_fun (*this, &BarController::entry_focus_out)); - spinner.set_digits (4); + if (mc && mc->is_gain_like ()) { + spinner.set_digits (1); // 0.1 dB + } else { + spinner.set_digits (4); + } spinner.set_numeric (true); spinner.set_name ("BarControlSpinner"); add (_slider);