adjust plugin-UI height when toggling expanders
This commit is contained in:
parent
dade1f39b7
commit
d0f594ffd0
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -153,7 +153,6 @@ class PlugUIBase : public virtual sigc::trackable, public PBD::ScopedConnectionL
|
|||
ArdourWindow* latency_dialog;
|
||||
|
||||
PluginEqGui* eqgui;
|
||||
Gtk::Requisition pre_eq_size;
|
||||
|
||||
Gtk::Image* focus_out_image;
|
||||
Gtk::Image* focus_in_image;
|
||||
|
|
Loading…
Reference in New Issue
Block a user