workaround OSX bug, fixes #4555

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67416 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2011-04-08 15:09:38 +00:00
parent f27479e6bd
commit bbca44f104

View File

@@ -16,6 +16,22 @@
#include "wx/slider.h"
#include "wx/osx/private.h"
class wxMacSliderCarbonControl : public wxMacControl
{
public :
wxMacSliderCarbonControl( wxWindowMac* peer ) : wxMacControl( peer )
{
}
// work around an OSX bug : if the control is having the keyboard focus it cannot
// be set to the full max/min values by dragging
virtual bool CanFocus() const
{
return false;
}
};
wxWidgetImplType* wxWidgetImpl::CreateSlider( wxWindowMac* wxpeer,
wxWindowMac* parent,
wxWindowID WXUNUSED(id),
@@ -38,7 +54,7 @@ wxWidgetImplType* wxWidgetImpl::CreateSlider( wxWindowMac* wxpeer,
tickMarks /= 5;
wxMacControl* peer = new wxMacControl( wxpeer );
wxMacControl* peer = new wxMacSliderCarbonControl( wxpeer );
OSStatus err = CreateSliderControl(
MAC_WXHWND(parent->MacGetTopLevelWindowRef()), &bounds,
value, minimum, maximum,