summaryrefslogtreecommitdiff
path: root/gtk2_ardour/port_matrix.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-07-27 02:10:27 +0000
committerCarl Hetherington <carl@carlh.net>2010-07-27 02:10:27 +0000
commit43e4abb391863576f904e46029d22f26173678d0 (patch)
tree29d495552feedaf2c0ec2971f2749bdb26480b19 /gtk2_ardour/port_matrix.cc
parentd69e177076aa10e19992c8f6133a8928c24c81e2 (diff)
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
Diffstat (limited to 'gtk2_ardour/port_matrix.cc')
-rw-r--r--gtk2_ardour/port_matrix.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/gtk2_ardour/port_matrix.cc b/gtk2_ardour/port_matrix.cc
index 06f869b675..f3559cbb21 100644
--- a/gtk2_ardour/port_matrix.cc
+++ b/gtk2_ardour/port_matrix.cc
@@ -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);
}