rect.width -= penWidth - 1;
rect.height -= penWidth - 1;
-#ifdef __WXGTK__
- // FIXME: why is the rect drawn off-by-one?
- if ((penWidth == 2) && (GetLayoutDirection() == wxLayout_RightToLeft))
- rect.x -= 1;
-#endif
-
// Now draw the rectangle
// use the cellHighlightColour if the cell is inside a selection, this
// will ensure the cell is always visible.
{
i = GetColAt( colPos );
- int colRight = GetColRight(i) - 1;
+ int colRight = GetColRight(i);
+#ifdef __WXGTK__
+ if (GetLayoutDirection() != wxLayout_RightToLeft)
+#endif
+ colRight--;
+
if ( colRight > right )
{
break;
if ( column )
{
- dc.GetTextExtent( GetColLabelValue(col), &w, &h );
+ dc.GetMultiLineTextExtent( GetColLabelValue(col), &w, &h );
if ( GetColLabelTextOrientation() == wxVERTICAL )
w = h;
}
else
- dc.GetTextExtent( GetRowLabelValue(row), &w, &h );
+ dc.GetMultiLineTextExtent( GetRowLabelValue(row), &w, &h );
extent = column ? w : h;
if ( extent > extentMax )