From 62ae887159bb2d9a2740cefb234960a9f7694164 Mon Sep 17 00:00:00 2001 From: AliKet Date: Sat, 6 Feb 2021 08:39:01 -0800 Subject: [PATCH] minor correction to widgets sample to work correctly in RTL layout --- samples/widgets/widgets.cpp | 2 ++ samples/widgets/widgets.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/samples/widgets/widgets.cpp b/samples/widgets/widgets.cpp index 5d83b2461e..ee36bde0c8 100644 --- a/samples/widgets/widgets.cpp +++ b/samples/widgets/widgets.cpp @@ -459,6 +459,8 @@ WidgetsFrame::WidgetsFrame(const wxString& title) menuWidget->AppendSeparator(); menuWidget->AppendCheckItem(Widgets_LayoutDirection, "Toggle &layout direction\tCtrl-L"); + menuWidget->Check(Widgets_LayoutDirection, + GetLayoutDirection() == wxLayout_RightToLeft); menuWidget->AppendSeparator(); menuWidget->AppendCheckItem(Widgets_GlobalBusyCursor, diff --git a/samples/widgets/widgets.h b/samples/widgets/widgets.h index ffc6112688..0cc834d9d8 100644 --- a/samples/widgets/widgets.h +++ b/samples/widgets/widgets.h @@ -95,7 +95,7 @@ struct WidgetAttributes #endif // wxUSE_TOOLTIPS m_enabled = true; m_show = true; - m_dir = wxLayout_LeftToRight; + m_dir = wxLayout_Default; m_variant = wxWINDOW_VARIANT_NORMAL; m_cursor = wxNullCursor; m_defaultFlags = wxBORDER_DEFAULT;