X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ccf0e7f6d42817cad37fc6480a6c0381fe6799e0..4b796bb03c1410ebda4b010130fb022a8729a68f:/src/mac/carbon/listbox.cpp?ds=sidebyside diff --git a/src/mac/carbon/listbox.cpp b/src/mac/carbon/listbox.cpp index 7dfe8b1f32..cb6e1e96ba 100644 --- a/src/mac/carbon/listbox.cpp +++ b/src/mac/carbon/listbox.cpp @@ -81,9 +81,9 @@ static pascal void wxMacListDefinition( short message, Boolean isSelected, Rect savedClipRegion = NewRgn(); GetClip( savedClipRegion ); + ClipRect( drawRect ); EraseRect( drawRect ); - MoveTo(drawRect->left + 4 , drawRect->top + 10 ); ::TextFont( kFontIDMonaco ) ; @@ -265,6 +265,27 @@ void wxListBox::Free() } } +void wxListBox::DoSetSize(int x, int y, + int width, int height, + int sizeFlags ) +{ + wxControl::DoSetSize( x , y , width , height , sizeFlags ) ; +#if TARGET_CARBON + Rect bounds ; + GetControlBounds( m_macControl , &bounds ) ; + ControlRef control = GetListVerticalScrollBar( m_macList ) ; + if ( control ) + { + Rect scrollbounds ; + GetControlBounds( control , &scrollbounds ) ; + if( scrollbounds.right != bounds.right + 1 ) + { + UMAMoveControl( control , bounds.right - (scrollbounds.right - scrollbounds.left) + 1 , + scrollbounds.top ) ; + } + } +#endif +} void wxListBox::DoSetFirstItem(int N) { MacScrollTo( N ) ;