diff --git a/gtk2_ardour/io_selector.cc b/gtk2_ardour/io_selector.cc
index f90ce88545..9399a6aaa7 100644
--- a/gtk2_ardour/io_selector.cc
+++ b/gtk2_ardour/io_selector.cc
@@ -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);
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 (_("Destinations"));
_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 (_("Destinations"));
_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 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 const m = max_size ();
+ resize_window_to_proportion_of_monitor (_parent, m.first, m.second);
}