X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/46b59ead9d8c39a06d2caa2abdb20b00998a2089..7564225f8bff6e6c2ed27695836035fa85a81189:/src/mac/carbon/renderer.cpp?ds=sidebyside diff --git a/src/mac/carbon/renderer.cpp b/src/mac/carbon/renderer.cpp index b7bab73d90..8cc6fae7dd 100644 --- a/src/mac/carbon/renderer.cpp +++ b/src/mac/carbon/renderer.cpp @@ -82,10 +82,18 @@ void wxRendererMac::DrawHeaderButton( wxWindow *win, wxHeaderSortIconType sortArrow, wxHeaderButtonParams* params ) { - const wxCoord x = dc.LogicalToDeviceX(rect.x /*- 1*/); - const wxCoord y = dc.LogicalToDeviceY(rect.y /*- 1*/); +#if !wxMAC_USE_CORE_GRAPHICS + const wxCoord x = dc.LogicalToDeviceX(rect.x); + const wxCoord y = dc.LogicalToDeviceY(rect.y); const wxCoord w = dc.LogicalToDeviceXRel(rect.width); const wxCoord h = dc.LogicalToDeviceYRel(rect.height); +#else + // now the wxGCDC is using native transformations + const wxCoord x = rect.x; + const wxCoord y = rect.y; + const wxCoord w = rect.width; + const wxCoord h = rect.height; +#endif dc.SetBrush( *wxTRANSPARENT_BRUSH ); @@ -192,10 +200,18 @@ void wxRendererMac::DrawTreeItemButton( wxWindow *win, const wxRect& rect, int flags ) { - const wxCoord x = dc.LogicalToDeviceX(rect.x /*- 1*/); - const wxCoord y = dc.LogicalToDeviceY(rect.y /*- 1*/); +#if !wxMAC_USE_CORE_GRAPHICS + const wxCoord x = dc.LogicalToDeviceX(rect.x); + const wxCoord y = dc.LogicalToDeviceY(rect.y); const wxCoord w = dc.LogicalToDeviceXRel(rect.width); const wxCoord h = dc.LogicalToDeviceYRel(rect.height); +#else + // now the wxGCDC is using native transformations + const wxCoord x = rect.x; + const wxCoord y = rect.y; + const wxCoord w = rect.width; + const wxCoord h = rect.height; +#endif dc.SetBrush( *wxTRANSPARENT_BRUSH );