From 34c54237fcbd79c67f72002fa15f844b5fad0783 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. (cherry picked from commit d8a90b4606b7ecaf19988b808393c51f0da9d6f8) --- 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 93e4266d2b..38b9d52e30 100644 --- a/src/stc/stc.cpp +++ b/src/stc/stc.cpp @@ -222,6 +222,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 6b5e34d486..cd4ee94e94 100644 --- a/src/stc/stc.cpp.in +++ b/src/stc/stc.cpp.in @@ -222,6 +222,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; }