Fix port matrix dimensions on non-24-bit displays (#4077).
authorCarl Hetherington <carl@carlh.net>
Fri, 4 Nov 2011 20:33:26 +0000 (20:33 +0000)
committerCarl Hetherington <carl@carlh.net>
Fri, 4 Nov 2011 20:33:26 +0000 (20:33 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@10444 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/port_matrix_column_labels.cc
gtk2_ardour/port_matrix_row_labels.cc

index 30ff67b9b2bdb7d3d1007bbe92aff12b728ff157..091eb0f9daf0375972345d84f8a8cb34a5494050 100644 (file)
@@ -39,7 +39,7 @@ PortMatrixColumnLabels::PortMatrixColumnLabels (PortMatrix* m, PortMatrixBody* b
 void
 PortMatrixColumnLabels::compute_dimensions ()
 {
-       GdkPixmap* pm = gdk_pixmap_new (NULL, 1, 1, 24);
+       GdkPixmap* pm = gdk_pixmap_new (NULL, 1, 1, gdk_visual_get_depth (gdk_visual_get_system ()));
        gdk_drawable_set_colormap (pm, gdk_colormap_get_system());
        cairo_t* cr = gdk_cairo_create (pm);
 
index 8c8dcd4dfff5ab09d6f4a0945f54e694168493de..e8a14b713ca29f9f8af4a9ca14cf21856d3f2114 100644 (file)
@@ -38,7 +38,7 @@ PortMatrixRowLabels::PortMatrixRowLabels (PortMatrix* m, PortMatrixBody* b)
 void
 PortMatrixRowLabels::compute_dimensions ()
 {
-       GdkPixmap* pm = gdk_pixmap_new (NULL, 1, 1, 24);
+       GdkPixmap* pm = gdk_pixmap_new (NULL, 1, 1, gdk_visual_get_depth (gdk_visual_get_system ()));
        gdk_drawable_set_colormap (pm, gdk_colormap_get_system());
        cairo_t* cr = gdk_cairo_create (pm);