From a19a52398a935f98d7b2bd9ce17e557026cc5c23 Mon Sep 17 00:00:00 2001 From: Chris Pavlina Date: Wed, 23 Mar 2016 14:38:00 -0400 Subject: [PATCH] Fix graphics rendering on RTL systems (lp:1559545) * wxWidgets mirrors graphics by default on RTL systems so it is necessary to individually set graphics canvases to LTR mode to avoid this. --- common/draw_panel.cpp | 2 ++ common/draw_panel_gal.cpp | 2 ++ common/html_messagebox.cpp | 1 + eeschema/dialogs/dialog_choose_component.cpp | 1 + eeschema/dialogs/dialog_rescue_each.cpp | 3 +++ 5 files changed, 9 insertions(+) diff --git a/common/draw_panel.cpp b/common/draw_panel.cpp index cc53c2e992..035420e90f 100644 --- a/common/draw_panel.cpp +++ b/common/draw_panel.cpp @@ -106,6 +106,8 @@ EDA_DRAW_PANEL::EDA_DRAW_PANEL( EDA_DRAW_FRAME* parent, int id, m_scrollIncrementX = std::min( size.x / 8, 10 ); m_scrollIncrementY = std::min( size.y / 8, 10 ); + SetLayoutDirection( wxLayout_LeftToRight ); + SetBackgroundColour( MakeColour( parent->GetDrawBgColor() ) ); #if KICAD_USE_BUFFERED_DC || KICAD_USE_BUFFERED_PAINTDC diff --git a/common/draw_panel_gal.cpp b/common/draw_panel_gal.cpp index 3a2e5273bd..783dadad1a 100644 --- a/common/draw_panel_gal.cpp +++ b/common/draw_panel_gal.cpp @@ -62,6 +62,8 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin m_eventDispatcher = NULL; m_lostFocus = false; + SetLayoutDirection( wxLayout_LeftToRight ); + SwitchBackend( aGalType ); SetBackgroundStyle( wxBG_STYLE_CUSTOM ); ShowScrollbars( wxSHOW_SB_ALWAYS, wxSHOW_SB_ALWAYS ); diff --git a/common/html_messagebox.cpp b/common/html_messagebox.cpp index 8b14b541b5..0abc8ef9dc 100644 --- a/common/html_messagebox.cpp +++ b/common/html_messagebox.cpp @@ -32,6 +32,7 @@ HTML_MESSAGE_BOX::HTML_MESSAGE_BOX( wxWindow* parent, const wxString& aTitle, wxPoint aPos, wxSize aSize) : DIALOG_DISPLAY_HTML_TEXT_BASE( parent, wxID_ANY, aTitle, aPos, aSize ) { + m_htmlWindow->SetLayoutDirection( wxLayout_LeftToRight ); ListClear(); Center(); } diff --git a/eeschema/dialogs/dialog_choose_component.cpp b/eeschema/dialogs/dialog_choose_component.cpp index cea0c7f75a..3183c1d649 100644 --- a/eeschema/dialogs/dialog_choose_component.cpp +++ b/eeschema/dialogs/dialog_choose_component.cpp @@ -46,6 +46,7 @@ DIALOG_CHOOSE_COMPONENT::DIALOG_CHOOSE_COMPONENT( SCH_BASE_FRAME* aParent, const m_search_container->SetTree( m_libraryComponentTree ); m_searchBox->SetFocus(); m_componentDetails->SetEditable( false ); + m_componentView->SetLayoutDirection( wxLayout_LeftToRight ); m_libraryComponentTree->ScrollTo( m_libraryComponentTree->GetFocusedItem() ); diff --git a/eeschema/dialogs/dialog_rescue_each.cpp b/eeschema/dialogs/dialog_rescue_each.cpp index ac804ba2ea..054594f5f9 100644 --- a/eeschema/dialogs/dialog_rescue_each.cpp +++ b/eeschema/dialogs/dialog_rescue_each.cpp @@ -88,6 +88,9 @@ DIALOG_RESCUE_EACH::DIALOG_RESCUE_EACH( SCH_EDIT_FRAME* aParent, RESCUER& aRescu "\n" "The following changes are recommended to update the project." ); m_lblInfo->SetLabel( info_message ); + + m_componentViewOld->SetLayoutDirection( wxLayout_LeftToRight ); + m_componentViewNew->SetLayoutDirection( wxLayout_LeftToRight ); }