X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fplugin_ui.cc;h=1f70537a41dc4cc402c09a7e47faba3dc1e593b4;hb=b8f5306d5bf59ddb237fabcdbab91a7d1e6fd612;hp=d3f984b0a64b766be1f37fe512564e55f78e3b96;hpb=412fcafda0afdb161368fcf05870770aeff79525;p=ardour.git diff --git a/gtk2_ardour/plugin_ui.cc b/gtk2_ardour/plugin_ui.cc index d3f984b0a6..1f70537a41 100644 --- a/gtk2_ardour/plugin_ui.cc +++ b/gtk2_ardour/plugin_ui.cc @@ -70,7 +70,7 @@ #include "new_plugin_preset_dialog.h" #include "tooltips.h" -#include "i18n.h" +#include "pbd/i18n.h" using namespace std; using namespace ARDOUR; @@ -710,7 +710,19 @@ PlugUIBase::toggle_description() } if (!description_expander.get_expanded()) { + const int child_height = description_expander.get_child ()->get_height (); + description_expander.remove(); + + Gtk::Window *toplevel = (Gtk::Window*) description_expander.get_ancestor (GTK_TYPE_WINDOW); + + if (toplevel) { + Gtk::Requisition wr; + toplevel->get_size (wr.width, wr.height); + wr.height -= child_height; + toplevel->resize (wr.width, wr.height); + } + } } @@ -725,12 +737,6 @@ PlugUIBase::toggle_plugin_analysis() eqgui = new PluginEqGui (insert); } - Gtk::Window *toplevel = (Gtk::Window*) plugin_analysis_expander.get_ancestor (GTK_TYPE_WINDOW); - - if (toplevel) { - toplevel->get_size (pre_eq_size.width, pre_eq_size.height); - } - plugin_analysis_expander.add (*eqgui); plugin_analysis_expander.show_all (); eqgui->start_listening (); @@ -738,6 +744,7 @@ PlugUIBase::toggle_plugin_analysis() if (!plugin_analysis_expander.get_expanded()) { // Hide & remove from expander + const int child_height = plugin_analysis_expander.get_child ()->get_height (); eqgui->hide (); eqgui->stop_listening (); @@ -746,7 +753,10 @@ PlugUIBase::toggle_plugin_analysis() Gtk::Window *toplevel = (Gtk::Window*) plugin_analysis_expander.get_ancestor (GTK_TYPE_WINDOW); if (toplevel) { - toplevel->resize (pre_eq_size.width, pre_eq_size.height); + Gtk::Requisition wr; + toplevel->get_size (wr.width, wr.height); + wr.height -= child_height; + toplevel->resize (wr.width, wr.height); } } }