summaryrefslogtreecommitdiff
path: root/gtk2_ardour/generic_pluginui.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-09-23 19:40:55 +0200
committerRobin Gareus <robin@gareus.org>2017-09-23 19:42:04 +0200
commitd931f4f69da478fca17257b1725ac68f9b8dc1b7 (patch)
treeaa34d9dc598a6c44a32d1d9b35fed99836af0a8a /gtk2_ardour/generic_pluginui.cc
parent39fb5762b0d7fe7723bbad38abf22387b7d9c432 (diff)
The beginning of the end for ClickBox
This fixes various issues with integer controls (some values are not reachable due to incorrect rounding in AutoSpin) and also pulls in the various benefits of BarController: * mouse-drags * numeric entry * alternative entry modes (piano-keyboard, tempo-based values) If this style remains, ClickBox & AutoSpin should be removed from the codebase.
Diffstat (limited to 'gtk2_ardour/generic_pluginui.cc')
-rw-r--r--gtk2_ardour/generic_pluginui.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/gtk2_ardour/generic_pluginui.cc b/gtk2_ardour/generic_pluginui.cc
index e1a737444d..e01a367559 100644
--- a/gtk2_ardour/generic_pluginui.cc
+++ b/gtk2_ardour/generic_pluginui.cc
@@ -1014,7 +1014,7 @@ GenericPluginUI::build_control_ui (const Evoral::Parameter& param,
Adjustment* adj = control_ui->controller->adjustment();
- if (desc.integer_step && !desc.toggled) {
+ if (false /* desc.integer_step && !desc.toggled */) {
control_ui->clickbox = new ArdourWidgets::ClickBox (adj, "PluginUIClickBox", true);
Gtkmm2ext::set_size_request_to_display_given_text (*control_ui->clickbox, "g9999999", 2, 2);
if (desc.unit == ParameterDescriptor::MIDI_NOTE) {
@@ -1034,6 +1034,11 @@ GenericPluginUI::build_control_ui (const Evoral::Parameter& param,
} else {
control_ui->controller->set_size_request (200, -1);
control_ui->controller->set_name (X_("ProcessorControlSlider"));
+ if (desc.integer_step) {
+ AutomationBarController* abc = dynamic_cast <AutomationBarController*> (control_ui->controller->widget ());
+ assert (abc);
+ abc->set_digits (0);
+ }
}
if (!desc.integer_step && !desc.toggled && use_knob) {