From 7a8b210dffca8df1014c7d72be725d2e6ca41718 Mon Sep 17 00:00:00 2001 From: Dimitri Schoolwerth Date: Sat, 13 Feb 2021 13:28:37 +0100 Subject: [PATCH] Undo mimicking faulty wxDC::DrawLabel() wxALIGN_RIGHT positioning Revert b642747fd2 (Fix right aligned text position in wxDVC on MSW with system theme, 2015-09-30) which in wxRendererXP::DrawItemText() mimicks the off-by-one with right alignment of wxDC::DrawLabel() that got fixed by the previous commit. There's not a similar change copying wxDC::DrawLabel()'s former off-by-one behaviour with wxALIGN_BOTTOM that would need reverting. Both alignments now result in the same text positioning with both drawing functions. --- src/msw/renderer.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/msw/renderer.cpp b/src/msw/renderer.cpp index 74a3cb26e4..1e6e4c6c62 100644 --- a/src/msw/renderer.cpp +++ b/src/msw/renderer.cpp @@ -1093,10 +1093,7 @@ 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;