Fix right aligned text position in wxDVC on MSW with system theme

Right aligned text was one pixel off when inside selection rect.

Close #16414
This commit is contained in:
Tobias Taschner 2015-09-30 19:15:25 +02:00 committed by Vadim Zeitlin
parent 4ac0250f90
commit b642747fd2

View File

@ -1021,7 +1021,10 @@ void wxRendererXP::DrawItemText(wxWindow* win,
if ( align & wxALIGN_CENTER_HORIZONTAL )
textFlags |= DT_CENTER;
else if ( align & wxALIGN_RIGHT )
{
textFlags |= DT_RIGHT;
rc.right--; // Alignment is inconsistent with DrawLabel otherwise
}
else
textFlags |= DT_LEFT;