From a49afa93ca428a2236d5bc76f628241036f01629 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Wed, 23 May 2001 06:15:16 +0000 Subject: [PATCH] scrollbar fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10286 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/dialog.cpp | 3 ++- src/mac/carbon/scrolbar.cpp | 5 +++-- src/mac/carbon/stattext.cpp | 2 +- src/mac/carbon/window.cpp | 6 +++--- src/mac/dialog.cpp | 3 ++- src/mac/scrolbar.cpp | 5 +++-- src/mac/stattext.cpp | 2 +- src/mac/window.cpp | 6 +++--- 8 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/mac/carbon/dialog.cpp b/src/mac/carbon/dialog.cpp index 760c07680a..044002d970 100644 --- a/src/mac/carbon/dialog.cpp +++ b/src/mac/carbon/dialog.cpp @@ -215,6 +215,7 @@ void wxDialog::DoShowModal() } // TODO : test whether parent gets disabled + bool formerModal = s_macIsInModalLoop ; s_macIsInModalLoop = true ; while ( IsModalShowing() ) @@ -225,7 +226,7 @@ void wxDialog::DoShowModal() wxTheApp->MacDoOneEvent() ; } - s_macIsInModalLoop = false ; + s_macIsInModalLoop = formerModal ; // TODO probably reenable the parent window if any diff --git a/src/mac/carbon/scrolbar.cpp b/src/mac/carbon/scrolbar.cpp index 92d6dd1faf..fb7a5311ca 100644 --- a/src/mac/carbon/scrolbar.cpp +++ b/src/mac/carbon/scrolbar.cpp @@ -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() ; } diff --git a/src/mac/carbon/stattext.cpp b/src/mac/carbon/stattext.cpp index a99f6c4e69..33e784261d 100644 --- a/src/mac/carbon/stattext.cpp +++ b/src/mac/carbon/stattext.cpp @@ -61,7 +61,7 @@ void wxStaticText::OnDraw( wxDC &dc ) return; PrepareDC(dc); -// dc.Clear() ; this eventually draws in the wrong background colour (appearance panels) + dc.Clear() ; int x = 0 ; int y = 0 ; diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index 48ac3429cf..ec1e62b0d1 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -1277,7 +1277,7 @@ void wxWindow::SetScrollbar(int orient, int pos, int thumbVisible, { if ( !m_hScrollBar->IsShown() ) m_hScrollBar->Show(true) ; - m_hScrollBar->SetScrollbar( pos , thumbVisible , range , refresh ) ; + m_hScrollBar->SetScrollbar( pos , thumbVisible , range , thumbVisible , refresh ) ; } } } @@ -1294,7 +1294,7 @@ void wxWindow::SetScrollbar(int orient, int pos, int thumbVisible, { if ( !m_vScrollBar->IsShown() ) m_vScrollBar->Show(true) ; - m_vScrollBar->SetScrollbar( pos , thumbVisible , range , refresh ) ; + m_vScrollBar->SetScrollbar( pos , thumbVisible , range , thumbVisible , refresh ) ; } } } @@ -1866,7 +1866,7 @@ void wxWindow::MacRedraw( RgnHandle updatergn , long time) if ( GetParent() && m_backgroundColour != GetParent()->GetBackgroundColour() ) eraseBackground = true ; - SetClip( updatergn ) ; + SetClip( ownUpdateRgn ) ; if ( m_macEraseOnRedraw ) { if ( eraseBackground ) { diff --git a/src/mac/dialog.cpp b/src/mac/dialog.cpp index 760c07680a..044002d970 100644 --- a/src/mac/dialog.cpp +++ b/src/mac/dialog.cpp @@ -215,6 +215,7 @@ void wxDialog::DoShowModal() } // TODO : test whether parent gets disabled + bool formerModal = s_macIsInModalLoop ; s_macIsInModalLoop = true ; while ( IsModalShowing() ) @@ -225,7 +226,7 @@ void wxDialog::DoShowModal() wxTheApp->MacDoOneEvent() ; } - s_macIsInModalLoop = false ; + s_macIsInModalLoop = formerModal ; // TODO probably reenable the parent window if any diff --git a/src/mac/scrolbar.cpp b/src/mac/scrolbar.cpp index 92d6dd1faf..fb7a5311ca 100644 --- a/src/mac/scrolbar.cpp +++ b/src/mac/scrolbar.cpp @@ -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() ; } diff --git a/src/mac/stattext.cpp b/src/mac/stattext.cpp index a99f6c4e69..33e784261d 100644 --- a/src/mac/stattext.cpp +++ b/src/mac/stattext.cpp @@ -61,7 +61,7 @@ void wxStaticText::OnDraw( wxDC &dc ) return; PrepareDC(dc); -// dc.Clear() ; this eventually draws in the wrong background colour (appearance panels) + dc.Clear() ; int x = 0 ; int y = 0 ; diff --git a/src/mac/window.cpp b/src/mac/window.cpp index 48ac3429cf..ec1e62b0d1 100644 --- a/src/mac/window.cpp +++ b/src/mac/window.cpp @@ -1277,7 +1277,7 @@ void wxWindow::SetScrollbar(int orient, int pos, int thumbVisible, { if ( !m_hScrollBar->IsShown() ) m_hScrollBar->Show(true) ; - m_hScrollBar->SetScrollbar( pos , thumbVisible , range , refresh ) ; + m_hScrollBar->SetScrollbar( pos , thumbVisible , range , thumbVisible , refresh ) ; } } } @@ -1294,7 +1294,7 @@ void wxWindow::SetScrollbar(int orient, int pos, int thumbVisible, { if ( !m_vScrollBar->IsShown() ) m_vScrollBar->Show(true) ; - m_vScrollBar->SetScrollbar( pos , thumbVisible , range , refresh ) ; + m_vScrollBar->SetScrollbar( pos , thumbVisible , range , thumbVisible , refresh ) ; } } } @@ -1866,7 +1866,7 @@ void wxWindow::MacRedraw( RgnHandle updatergn , long time) if ( GetParent() && m_backgroundColour != GetParent()->GetBackgroundColour() ) eraseBackground = true ; - SetClip( updatergn ) ; + SetClip( ownUpdateRgn ) ; if ( m_macEraseOnRedraw ) { if ( eraseBackground ) { -- 2.47.2