X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/913df6f2e0ab502732b271624c95af807d42007c..6443de026310552cacd68a6d0318e73d14929680:/src/generic/gridg.cpp diff --git a/src/generic/gridg.cpp b/src/generic/gridg.cpp index b8ccc24fc7..3f28058a14 100644 --- a/src/generic/gridg.cpp +++ b/src/generic/gridg.cpp @@ -25,6 +25,8 @@ #pragma hdrstop #endif +#if wxUSE_GRID + #ifndef WX_PRECOMP #include "wx/utils.h" #include "wx/dcclient.h" @@ -1786,21 +1788,21 @@ void wxGenericGrid::DrawTextRect(wxDC *dc, const wxString& text, wxRect *rect, i { case wxRIGHT: { - x = (rect->x + rect->width - textWidth - 1.0); - y = (rect->y + (rect->height - textHeight)/2.0); + x = (rect->x + rect->width - textWidth - (float)1.0); + y = (rect->y + (rect->height - textHeight)/(float)2.0); break; } case wxCENTRE: { - x = (rect->x + (rect->width - textWidth)/2.0); - y = (rect->y + (rect->height - textHeight)/2.0); + x = (rect->x + (rect->width - textWidth)/(float)2.0); + y = (rect->y + (rect->height - textHeight)/(float)2.0); break; } case wxLEFT: default: { - x = (rect->x + 1.0); - y = (rect->y + (rect->height - textHeight)/2.0); + x = (rect->x + (float)1.0); + y = (rect->y + (rect->height - textHeight)/(float)2.0); break; } } @@ -2852,3 +2854,4 @@ void *wxGenericGrid::GetCellData(int row, int col) return rc; } +#endif // wxUSE_GRID