X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/519cb848a8f4c91c73421bb75314754284e593a4..dd107c50be43e8d4dbdba20df162faf119a3781c:/src/mac/scrolbar.cpp diff --git a/src/mac/scrolbar.cpp b/src/mac/scrolbar.cpp index a432b3e9b1..0c1a130c78 100644 --- a/src/mac/scrolbar.cpp +++ b/src/mac/scrolbar.cpp @@ -41,7 +41,7 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, MacPreControlCreate( parent , id , "" , pos , size ,style, validator , name , &bounds , title ) ; - m_macControl = UMANewControl( parent->GetMacRootWindow() , &bounds , title , true , 0 , 0 , 100, + m_macControl = UMANewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , 0 , 100, kControlScrollBarLiveProc , (long) this ) ; wxASSERT_MSG( m_macControl != NULL , "No valid mac control" ) ; @@ -82,9 +82,10 @@ void wxScrollBar::SetScrollbar(int position, int thumbSize, int range, int pageS if ( UMAGetAppearanceVersion() >= 0x0110 ) { -#if UMA_USE_8_6 + if ( SetControlViewSize != (void*) kUnresolvedCFragSymbolAddress ) + { SetControlViewSize( m_macControl , m_pageSize ) ; -#endif + } } Refresh() ; } @@ -152,6 +153,13 @@ void wxScrollBar::MacHandleControlClick( ControlHandle control , SInt16 controlp } event.SetPosition(new_pos); event.SetEventObject( this ); - GetEventHandler()->ProcessEvent(event); + wxWindow* window = GetParent() ; + if (window && window->MacIsWindowScrollbar(this) ) + { + // this is hardcoded + window->MacOnScroll(event); + } + else + GetEventHandler()->ProcessEvent(event); }