Fix over aggressive clipping in generic wxListCtrl header drawing.
Clipping out 4 pixels vertically resulted in truncating any letters with descent (e.g. "g" or "q") under OS X where the native header size is just tall enough to show the text. Simply don't clip that much but use the entire header width. Closes #11780. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63947 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1160,7 +1160,7 @@ void wxListHeaderWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
|
|||||||
|
|
||||||
// draw the text and image clipping them so that they
|
// draw the text and image clipping them so that they
|
||||||
// don't overwrite the column boundary
|
// don't overwrite the column boundary
|
||||||
wxDCClipper clipper(dc, x, HEADER_OFFSET_Y, cw, h - 4 );
|
wxDCClipper clipper(dc, x, HEADER_OFFSET_Y, cw, h);
|
||||||
|
|
||||||
// if we have an image, draw it on the right of the label
|
// if we have an image, draw it on the right of the label
|
||||||
if ( imageList )
|
if ( imageList )
|
||||||
@@ -1170,13 +1170,13 @@ void wxListHeaderWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
|
|||||||
image,
|
image,
|
||||||
dc,
|
dc,
|
||||||
xAligned + wLabel - ix - HEADER_IMAGE_MARGIN_IN_REPORT_MODE,
|
xAligned + wLabel - ix - HEADER_IMAGE_MARGIN_IN_REPORT_MODE,
|
||||||
HEADER_OFFSET_Y + (h - 4 - iy)/2,
|
HEADER_OFFSET_Y + (h - iy)/2,
|
||||||
wxIMAGELIST_DRAW_TRANSPARENT
|
wxIMAGELIST_DRAW_TRANSPARENT
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
dc.DrawText( item.GetText(),
|
dc.DrawText( item.GetText(),
|
||||||
xAligned + EXTRA_WIDTH, h / 2 - hLabel / 2 ); //HEADER_OFFSET_Y + EXTRA_HEIGHT );
|
xAligned + EXTRA_WIDTH, (h - hLabel) / 2 );
|
||||||
|
|
||||||
x += wCol;
|
x += wCol;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user