diff --git a/docs/changes.txt b/docs/changes.txt index 82c9a27314..f37f01c488 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -193,3 +193,4 @@ wxOSX/Cocoa: - Implement strike-through support in wxFont (Igor Korot). - Provide native implementation of wxStandardPaths (Tobias Taschner). - Add wxTE_{RIGHT,CENTER} support for multiline wxTextCtrl (Andreas Falkenhahn). +- Don't leave wxSlider labels shown when the slider itself is hidden. diff --git a/include/wx/osx/slider.h b/include/wx/osx/slider.h index c5ccc8b3ac..e0ce8eb438 100644 --- a/include/wx/osx/slider.h +++ b/include/wx/osx/slider.h @@ -11,10 +11,11 @@ #ifndef _WX_SLIDER_H_ #define _WX_SLIDER_H_ +#include "wx/compositewin.h" #include "wx/stattext.h" // Slider -class WXDLLIMPEXP_CORE wxSlider: public wxSliderBase +class WXDLLIMPEXP_CORE wxSlider: public wxCompositeWindow { wxDECLARE_DYNAMIC_CLASS(wxSlider); @@ -100,6 +101,15 @@ protected: int m_lineSize; int m_tickFreq; private : + virtual wxWindowList GetCompositeWindowParts() const wxOVERRIDE + { + wxWindowList parts; + parts.push_back(m_macMinimumStatic); + parts.push_back(m_macMaximumStatic); + parts.push_back(m_macValueStatic); + return parts; + } + wxDECLARE_EVENT_TABLE(); };