From 870f03cd159e6c07d39c7b064de54458d116f62d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 22 Aug 2019 12:40:06 +0200 Subject: [PATCH] Handle wxSL_MIN_MAX_LABELS and wxSL_VALUE_LABEL correctly in wxMac Create the labels corresponding to each style instead of always creating all 3 of them whenever any of the styles is specified. See #11427. Closes https://github.com/wxWidgets/wxWidgets/pull/1495 --- src/osx/slider_osx.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/osx/slider_osx.cpp b/src/osx/slider_osx.cpp index 517d8c1780..d0bcc264f3 100644 --- a/src/osx/slider_osx.cpp +++ b/src/osx/slider_osx.cpp @@ -117,10 +117,14 @@ bool wxSlider::Create(wxWindow *parent, // other values #endif - if (style & wxSL_LABELS) + if (style & wxSL_MIN_MAX_LABELS) { m_macMinimumStatic = new wxStaticText( parent, wxID_ANY, wxEmptyString ); m_macMaximumStatic = new wxStaticText( parent, wxID_ANY, wxEmptyString ); + } + + if (style & wxSL_VALUE_LABEL) + { m_macValueStatic = new wxStaticText( parent, wxID_ANY, wxEmptyString ); }