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:
committed by
Vadim Zeitlin
parent
4ac0250f90
commit
b642747fd2
@@ -1021,7 +1021,10 @@ void wxRendererXP::DrawItemText(wxWindow* win,
|
|||||||
if ( align & wxALIGN_CENTER_HORIZONTAL )
|
if ( align & wxALIGN_CENTER_HORIZONTAL )
|
||||||
textFlags |= DT_CENTER;
|
textFlags |= DT_CENTER;
|
||||||
else if ( align & wxALIGN_RIGHT )
|
else if ( align & wxALIGN_RIGHT )
|
||||||
|
{
|
||||||
textFlags |= DT_RIGHT;
|
textFlags |= DT_RIGHT;
|
||||||
|
rc.right--; // Alignment is inconsistent with DrawLabel otherwise
|
||||||
|
}
|
||||||
else
|
else
|
||||||
textFlags |= DT_LEFT;
|
textFlags |= DT_LEFT;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user