mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 19:56:31 +01:00
adjust plugin-UI height when toggling expanders
This commit is contained in:
parent
dade1f39b7
commit
d0f594ffd0
2 changed files with 17 additions and 8 deletions
|
|
@ -710,7 +710,19 @@ PlugUIBase::toggle_description()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!description_expander.get_expanded()) {
|
if (!description_expander.get_expanded()) {
|
||||||
|
const int child_height = description_expander.get_child ()->get_height ();
|
||||||
|
|
||||||
description_expander.remove();
|
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);
|
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.add (*eqgui);
|
||||||
plugin_analysis_expander.show_all ();
|
plugin_analysis_expander.show_all ();
|
||||||
eqgui->start_listening ();
|
eqgui->start_listening ();
|
||||||
|
|
@ -738,6 +744,7 @@ PlugUIBase::toggle_plugin_analysis()
|
||||||
|
|
||||||
if (!plugin_analysis_expander.get_expanded()) {
|
if (!plugin_analysis_expander.get_expanded()) {
|
||||||
// Hide & remove from expander
|
// Hide & remove from expander
|
||||||
|
const int child_height = plugin_analysis_expander.get_child ()->get_height ();
|
||||||
|
|
||||||
eqgui->hide ();
|
eqgui->hide ();
|
||||||
eqgui->stop_listening ();
|
eqgui->stop_listening ();
|
||||||
|
|
@ -746,7 +753,10 @@ PlugUIBase::toggle_plugin_analysis()
|
||||||
Gtk::Window *toplevel = (Gtk::Window*) plugin_analysis_expander.get_ancestor (GTK_TYPE_WINDOW);
|
Gtk::Window *toplevel = (Gtk::Window*) plugin_analysis_expander.get_ancestor (GTK_TYPE_WINDOW);
|
||||||
|
|
||||||
if (toplevel) {
|
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;
|
ArdourWindow* latency_dialog;
|
||||||
|
|
||||||
PluginEqGui* eqgui;
|
PluginEqGui* eqgui;
|
||||||
Gtk::Requisition pre_eq_size;
|
|
||||||
|
|
||||||
Gtk::Image* focus_out_image;
|
Gtk::Image* focus_out_image;
|
||||||
Gtk::Image* focus_in_image;
|
Gtk::Image* focus_in_image;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue