From d8a90b4606b7ecaf19988b808393c51f0da9d6f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=CC=81clav=20Slavi=CC=81k?= Date: Mon, 28 Mar 2016 17:39:26 +0200 Subject: [PATCH] Don't mirror wxStyleTextCtrl under RTL locales Not onlu has Scintilla no support for RTL languages, it is rendered into a mirrored DC on Windows and so guaranteed unreadable and unsable. Fix it by explicitly setting the window's layout direction to LTR. --- src/stc/stc.cpp | 3 +++ src/stc/stc.cpp.in | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/stc/stc.cpp b/src/stc/stc.cpp index 6c6e770e58..bcf8b06c2d 100644 --- a/src/stc/stc.cpp +++ b/src/stc/stc.cpp @@ -224,6 +224,9 @@ bool wxStyledTextCtrl::Create(wxWindow *parent, // Make sure it can take the focus SetCanFocus(true); + // STC doesn't support RTL languages at all + SetLayoutDirection(wxLayout_LeftToRight); + return true; } diff --git a/src/stc/stc.cpp.in b/src/stc/stc.cpp.in index 922156c977..ca2b8a07b5 100644 --- a/src/stc/stc.cpp.in +++ b/src/stc/stc.cpp.in @@ -224,6 +224,9 @@ bool wxStyledTextCtrl::Create(wxWindow *parent, // Make sure it can take the focus SetCanFocus(true); + // STC doesn't support RTL languages at all + SetLayoutDirection(wxLayout_LeftToRight); + return true; }