_ignore_component_size_changed (false)
{
_column_labels = new PortMatrixColumnLabels (p, this);
- _row_labels = new PortMatrixRowLabels (p, this);
+ _row_labels = new PortMatrixRowLabels (p, this, *_column_labels);
_grid = new PortMatrixGrid (p, this);
_components.push_back (_column_labels);
#include "gtkmm2ext/colors.h"
#include "utils.h"
#include "port_matrix_row_labels.h"
+#include "port_matrix_column_labels.h"
#include "port_matrix.h"
#include "port_matrix_body.h"
#include "pbd/i18n.h"
using namespace std;
-PortMatrixRowLabels::PortMatrixRowLabels (PortMatrix* m, PortMatrixBody* b)
+PortMatrixRowLabels::PortMatrixRowLabels (PortMatrix* m, PortMatrixBody* b, PortMatrixColumnLabels& cols)
: PortMatrixLabels (m, b)
+ , _column_labels (cols)
{
}
_width += _longest_port_name;
_width += name_pad() * 2;
}
+
+ uint32_t needed_by_columns = _column_labels.dimensions().second * tan (angle());
+
+ if (_width < needed_by_columns) {
+ _longest_bundle_name += (needed_by_columns - _width);
+ _width = needed_by_columns;
+ }
}
class PortMatrix;
class PortMatrixBody;
class PortMatrixNode;
+class PortMatrixColumnLabels;
namespace ARDOUR {
class Bundle;
class PortMatrixRowLabels : public PortMatrixLabels
{
public:
- PortMatrixRowLabels (PortMatrix *, PortMatrixBody *);
+ PortMatrixRowLabels (PortMatrix *, PortMatrixBody *, PortMatrixColumnLabels&);
void button_press (double, double, GdkEventButton *);
double _longest_port_name;
double _longest_bundle_name;
+
+ PortMatrixColumnLabels& _column_labels;
};
#endif