summaryrefslogtreecommitdiff
path: root/gtk2_ardour/plugin_ui.h
diff options
context:
space:
mode:
authorJulien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr>2017-08-29 11:25:38 +0200
committerJulien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr>2017-08-29 12:06:33 +0200
commit1b561446b8c4c0f1b682ec04cb44c5f53672c5fc (patch)
tree5f31144d12faebf275468b4b43ce7d88b3ff2f83 /gtk2_ardour/plugin_ui.h
parentd4c211ef6fd7ea823963f003ec18b22c4ea39582 (diff)
GenericUI: rationalize Autostate button sizing
When there was a knobtable in the ControlUI, the behavior of the automation state button changed by displaying one-char state as in track headers. Factor out that logic to depend on a new boolean property of the ControlUI, which should be set with set_short_autostate(). This regroups sizing logic in a single place and avoids future discrepancies between the actual caption and the size allocated for it, when several use-cases for smaller buttons are added.
Diffstat (limited to 'gtk2_ardour/plugin_ui.h')
-rw-r--r--gtk2_ardour/plugin_ui.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gtk2_ardour/plugin_ui.h b/gtk2_ardour/plugin_ui.h
index 4075c94eb7..3b374298ac 100644
--- a/gtk2_ardour/plugin_ui.h
+++ b/gtk2_ardour/plugin_ui.h
@@ -237,6 +237,7 @@ private:
bool update_pending;
bool ignore_change;
+
/* output */
Gtk::EventBox* display;
@@ -252,8 +253,12 @@ private:
/* layout */
Gtk::Table* knobtable;
int x0, x1, y0, y1;
+
+ bool short_autostate; // modify with set_short_autostate below
};
+ void set_short_autostate(ControlUI* cui, bool value);
+
std::vector<ControlUI*> input_controls; // workaround for preset load
std::vector<ControlUI*> input_controls_with_automation;
std::vector<ControlUI*> output_controls;