summaryrefslogtreecommitdiff
path: root/gtk2_ardour/port_matrix_body.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-02-10 02:09:46 +0000
committerCarl Hetherington <carl@carlh.net>2009-02-10 02:09:46 +0000
commitc601946bc87d503f4bda1fc2d7321d99acc9d5f7 (patch)
treeb4aaf1c026d10b89ad7836337c27714dd43976cf /gtk2_ardour/port_matrix_body.cc
parent9fc369aa44e9c934f0f9fea7e02d812831cc7468 (diff)
Bit of a hack to make the port matrix for port inserts at least vaguely usable.
git-svn-id: svn://localhost/ardour2/branches/3.0@4516 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/port_matrix_body.cc')
-rw-r--r--gtk2_ardour/port_matrix_body.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/gtk2_ardour/port_matrix_body.cc b/gtk2_ardour/port_matrix_body.cc
index 3f8fcdc0c6..205e6d4bdd 100644
--- a/gtk2_ardour/port_matrix_body.cc
+++ b/gtk2_ardour/port_matrix_body.cc
@@ -146,8 +146,12 @@ PortMatrixBody::on_size_request (Gtk::Requisition *req)
/* don't ask for the maximum size of our contents, otherwise GTK won't
let the containing window shrink below this size */
- req->width = std::min (512, std::max (col.first, grid.first + row.first));
- req->height = std::min (512, col.second + grid.second);
+ /* XXX these shouldn't be hard-coded */
+ int const min_width = 512;
+ int const min_height = 512;
+
+ req->width = std::min (min_width, std::max (col.first, grid.first + row.first));
+ req->height = std::min (min_height / _matrix->min_height_divisor(), col.second + grid.second);
}
void