summaryrefslogtreecommitdiff
path: root/gtk2_ardour/plugin_ui.h
diff options
context:
space:
mode:
authorJulien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr>2016-08-20 18:12:49 +0200
committerJulien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr>2016-08-20 18:12:49 +0200
commitfcadcac7e7c6959c0306bfadaf21ded20a2ea5ea (patch)
tree637b8672e0037aebd8b82a04f7331cc19d0deec4 /gtk2_ardour/plugin_ui.h
parentaed07c49987b497c225944059f4da72ab64a4cff (diff)
Make knobs size requests dynamic
At the point of creation, the automate_button size request is wrong since it has not the correct style yet. Instead of trying ugly hacks to fix that, connect to the knob's size_request signal and get the button's requisition only when needed. If the system font changes to one that has different extents (even if the point size is the same), the UI will thus correctly update.
Diffstat (limited to 'gtk2_ardour/plugin_ui.h')
-rw-r--r--gtk2_ardour/plugin_ui.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/gtk2_ardour/plugin_ui.h b/gtk2_ardour/plugin_ui.h
index 57aa138af7..4fb052b5f5 100644
--- a/gtk2_ardour/plugin_ui.h
+++ b/gtk2_ardour/plugin_ui.h
@@ -292,6 +292,8 @@ class GenericPluginUI : public PlugUIBase, public Gtk::VBox
void set_automation_state (ARDOUR::AutoState state, ControlUI* cui);
void set_all_automation (ARDOUR::AutoState state);
+ void knob_size_request(Gtk::Requisition* req, ControlUI* cui);
+
/* XXX: remove */
void print_parameter (char *buf, uint32_t len, uint32_t param);
bool integer_printer (char* buf, Gtk::Adjustment &, ControlUI *);