Fix insane formatting (how did this even happen? copy paste from an email diff or...
[ardour.git] / gtk2_ardour / port_matrix_body.cc
index 3f8fcdc0c6a8bf869465afd8978b92feb0a3e138..205e6d4bdd9934116784ca38c756c3530d538d3e 100644 (file)
@@ -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