fix up various issues with sizing now that we have the basic idea that pixfaders can dynamically resize themselves (#5273)
git-svn-id: svn://localhost/ardour2/branches/3.0@13867 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
15078e5a6d
commit
a52fb39969
@ -691,6 +691,8 @@ ProcessorBox::ProcessorBox (ARDOUR::Session* sess, boost::function<PluginSelecto
|
||||
, _placement (-1)
|
||||
, _visible_prefader_processors (0)
|
||||
, _rr_selection(rsel)
|
||||
, _redisplay_pending (false)
|
||||
|
||||
{
|
||||
set_session (sess);
|
||||
|
||||
@ -843,7 +845,8 @@ ProcessorBox::set_width (Width w)
|
||||
(*i)->set_enum_width (w);
|
||||
}
|
||||
|
||||
redisplay_processors ();
|
||||
_redisplay_pending = true;
|
||||
|
||||
}
|
||||
|
||||
Gtk::Menu*
|
||||
@ -2501,9 +2504,14 @@ ProcessorBox::on_size_allocate (Allocation& a)
|
||||
{
|
||||
HBox::on_size_allocate (a);
|
||||
|
||||
list<ProcessorEntry*> children = processor_display.children ();
|
||||
for (list<ProcessorEntry*>::const_iterator i = children.begin(); i != children.end(); ++i) {
|
||||
(*i)->set_pixel_width (a.get_width ());
|
||||
if (_redisplay_pending) {
|
||||
_redisplay_pending = false;
|
||||
redisplay_processors ();
|
||||
} else {
|
||||
list<ProcessorEntry*> children = processor_display.children ();
|
||||
for (list<ProcessorEntry*>::const_iterator i = children.begin(); i != children.end(); ++i) {
|
||||
(*i)->set_pixel_width (a.get_width ());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -300,6 +300,7 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD
|
||||
void object_drop (Gtkmm2ext::DnDVBox<ProcessorEntry> *, ProcessorEntry *, Glib::RefPtr<Gdk::DragContext> const &);
|
||||
|
||||
Width _width;
|
||||
bool _redisplay_pending;
|
||||
|
||||
Gtk::Menu *processor_menu;
|
||||
gint processor_menu_map_handler (GdkEventAny *ev);
|
||||
|
Loading…
Reference in New Issue
Block a user