From b642747fd25b79c20bafc6cd978914ee6f745fd0 Mon Sep 17 00:00:00 2001 From: Tobias Taschner Date: Wed, 30 Sep 2015 19:15:25 +0200 Subject: [PATCH] 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 --- src/msw/renderer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/msw/renderer.cpp b/src/msw/renderer.cpp index 2f1bf7e1a4..a390d5b86b 100644 --- a/src/msw/renderer.cpp +++ b/src/msw/renderer.cpp @@ -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;