From ed8c3feab389493429c0a9bdde832b51a1c2186a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=CC=81clav=20Slavi=CC=81k?= Date: Fri, 21 Oct 2016 17:56:36 +0200 Subject: [PATCH] wxGTK: Don't right-align text by default in wxDVC wxDataViewTextRenderer::SetAlignment didn't consider the posibility of alignment being -1, causing the align & wxALIGN_RIGHT test to succeed and the text to be right-aligned if explicit alignment wasn't provided. This fix is only partial in that it simply does nothing in this case. The correct thing to do is to determine and apply alignment later, once it's known, but that's not possible to do on the 3.0 branch while preserving binary compatibility. (inspired by a6be5bdae3a05992bb6195eead5e7594ce64c871) --- src/gtk/dataview.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gtk/dataview.cpp b/src/gtk/dataview.cpp index fa3c58b5b7..87217e2fbc 100644 --- a/src/gtk/dataview.cpp +++ b/src/gtk/dataview.cpp @@ -2213,6 +2213,9 @@ void wxDataViewTextRenderer::SetAlignment( int align ) return; #endif + if (align == -1) + return; + // horizontal alignment: PangoAlignment pangoAlign = PANGO_ALIGN_LEFT; if (align & wxALIGN_RIGHT)