Improve resize behaviour of port matrices when their content size changes.

git-svn-id: svn://localhost/ardour2/branches/3.0@7507 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2010-07-27 02:10:27 +00:00
parent d69e177076
commit 43e4abb391
2 changed files with 7 additions and 7 deletions

View File

@ -218,9 +218,7 @@ IOSelectorWindow::IOSelectorWindow (ARDOUR::Session* session, boost::shared_ptr<
set_name ("IOSelectorWindow2");
set_title (_("I/O selector"));
Gtk::Alignment* alignment = manage(new Gtk::Alignment(0.5, 0.5, 0.0, 0.0));
alignment->add (_selector);
add (*alignment);
add (_selector);
set_position (Gtk::WIN_POS_MOUSE);

View File

@ -304,7 +304,7 @@ PortMatrix::select_arrangement ()
_hlabel.set_label (_("<b>Destinations</b>"));
_vlabel.set_angle (90);
attach (*_body, 1, 2, 0, 1);
attach (*_body, 1, 2, 0, 1, FILL | EXPAND, FILL | EXPAND);
attach (_vscroll, 2, 3, 0, 1, SHRINK);
attach (_hscroll, 1, 2, 2, 3, FILL | EXPAND, SHRINK);
attach (_vbox, 0, 1, 0, 1, SHRINK);
@ -322,7 +322,7 @@ PortMatrix::select_arrangement ()
_vlabel.set_label (_("<b>Destinations</b>"));
_vlabel.set_angle (-90);
attach (*_body, 0, 1, 1, 2);
attach (*_body, 0, 1, 1, 2, FILL | EXPAND, FILL | EXPAND);
attach (_vscroll, 2, 3, 1, 2, SHRINK);
attach (_hscroll, 0, 1, 2, 3, FILL | EXPAND, SHRINK);
attach (_vbox, 1, 2, 1, 2, SHRINK);
@ -587,8 +587,8 @@ PortMatrix::max_size () const
{
pair<uint32_t, uint32_t> m = _body->max_size ();
m.first += _vscroll.get_width ();
m.second += _hscroll.get_height ();
m.first += _vscroll.get_width () + _vbox.get_width () + 4;
m.second += _hscroll.get_height () + _hbox.get_height () + 4;
return m;
}
@ -787,6 +787,8 @@ PortMatrix::body_dimensions_changed ()
_vspacer.hide ();
}
pair<uint32_t, uint32_t> const m = max_size ();
resize_window_to_proportion_of_monitor (_parent, m.first, m.second);
}