summaryrefslogtreecommitdiff
path: root/gtk2_ardour/global_port_matrix.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour/global_port_matrix.cc')
-rw-r--r--gtk2_ardour/global_port_matrix.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/gtk2_ardour/global_port_matrix.cc b/gtk2_ardour/global_port_matrix.cc
index 3e8eea8866..be809e44bd 100644
--- a/gtk2_ardour/global_port_matrix.cc
+++ b/gtk2_ardour/global_port_matrix.cc
@@ -20,6 +20,7 @@
#include <gtkmm/image.h>
#include <gtkmm/stock.h>
#include "global_port_matrix.h"
+#include "utils.h"
#include "ardour/bundle.h"
#include "ardour/session.h"
@@ -123,16 +124,12 @@ GlobalPortMatrixWindow::GlobalPortMatrixWindow (ARDOUR::Session& s, ARDOUR::Data
add (_port_matrix);
show_all ();
-
- /* XXX: hack to make the window full-size on opening. This may not work for
- people with very large monitors */
-
- resize (32768, 32768);
}
void
GlobalPortMatrixWindow::on_show ()
{
Gtk::Window::on_show ();
- _port_matrix.setup_max_size ();
+ pair<uint32_t, uint32_t> const pm_max = _port_matrix.max_size ();
+ resize_window_to_proportion_of_monitor (this, pm_max.first, pm_max.second);
}