From da0299f30e6efc916b88e845c2be80abe7435788 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Thu, 3 Aug 2017 11:15:56 +0200 Subject: [PATCH] Fix text alignment in wxCheckBox Align the text according to the style. See #17933. --- src/osx/cocoa/checkbox.mm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/osx/cocoa/checkbox.mm b/src/osx/cocoa/checkbox.mm index 8a8dddeabd..76ce41757b 100644 --- a/src/osx/cocoa/checkbox.mm +++ b/src/osx/cocoa/checkbox.mm @@ -32,6 +32,8 @@ wxWidgetImplType* wxWidgetImpl::CreateCheckBox( wxWindowMac* wxpeer, [v setImagePosition:NSImageRight]; if (style & wxCHK_3STATE) [v setAllowsMixedState:YES]; + [v setAlignment: (style & wxALIGN_RIGHT) ? + NSRightTextAlignment : NSLeftTextAlignment]; wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v ); return c;