: input_selector (sess, pi->io(), true),
output_selector (sess, pi->io(), false)
{
+ output_selector.set_min_height_divisor (2);
+ input_selector.set_min_height_divisor (2);
+
pack_start (output_selector, true, true);
pack_start (input_selector, true, true);
}
_setup_once (false),
_arrangement (TOP_TO_RIGHT),
_row_index (0),
- _column_index (1)
+ _column_index (1),
+ _min_height_divisor (1)
{
_body = new PortMatrixBody (this);
}
}
-
void
PortMatrix::setup_all_ports ()
{
void setup_scrollbars ();
void popup_channel_context_menu (int, uint32_t, uint32_t);
+ int min_height_divisor () const {
+ return _min_height_divisor;
+ }
+ void set_min_height_divisor (int f) {
+ _min_height_divisor = f;
+ }
+
enum Arrangement {
TOP_TO_RIGHT, ///< column labels on top, row labels to the right
LEFT_TO_BOTTOM ///< row labels to the left, column labels on the bottom
Arrangement _arrangement;
int _row_index;
int _column_index;
+ int _min_height_divisor;
};
#endif
/* 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