From 1917819470b67cac7a645b1ec666288a3b91ec8a Mon Sep 17 00:00:00 2001 From: Ron Lee Date: Mon, 11 Nov 2002 05:29:18 +0000 Subject: [PATCH] Some code just *really* likes to be typo'd I guess. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17822 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/scrolwin.cpp | 8 +++++--- src/gtk1/scrolwin.cpp | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/gtk/scrolwin.cpp b/src/gtk/scrolwin.cpp index 82fc6e8b9a..a18ec663f7 100644 --- a/src/gtk/scrolwin.cpp +++ b/src/gtk/scrolwin.cpp @@ -349,10 +349,12 @@ void wxScrolledWindow::SetScrollbars( int pixelsPerUnitX, int pixelsPerUnitY, m_hAdjust->value = m_xScrollPosition = xPos; m_vAdjust->value = m_yScrollPosition = yPos; - // The first line should arguably be deprecated, the second we still need. + // Setting hints here should arguably be deprecated, but without it + // a sizer might override this manual scrollbar setting in old code. + m_targetWindow->SetVirtualSizeHints( noUnitsX * pixelsPerUnitX, noUnitsY * pixelsPerUnitY ); + m_targetWindow->SetVirtualSize( noUnitsX * pixelsPerUnitX, noUnitsY * pixelsPerUnitY ); - m_targetWindow->SetVirtualSize( noUnitsX * pixelsPerUnitX, noUnitsY * pixelsPerUnitY ); - + if (!noRefresh) { int new_x = m_xScrollPixelsPerLine * m_xScrollPosition; diff --git a/src/gtk1/scrolwin.cpp b/src/gtk1/scrolwin.cpp index 82fc6e8b9a..a18ec663f7 100644 --- a/src/gtk1/scrolwin.cpp +++ b/src/gtk1/scrolwin.cpp @@ -349,10 +349,12 @@ void wxScrolledWindow::SetScrollbars( int pixelsPerUnitX, int pixelsPerUnitY, m_hAdjust->value = m_xScrollPosition = xPos; m_vAdjust->value = m_yScrollPosition = yPos; - // The first line should arguably be deprecated, the second we still need. + // Setting hints here should arguably be deprecated, but without it + // a sizer might override this manual scrollbar setting in old code. + m_targetWindow->SetVirtualSizeHints( noUnitsX * pixelsPerUnitX, noUnitsY * pixelsPerUnitY ); + m_targetWindow->SetVirtualSize( noUnitsX * pixelsPerUnitX, noUnitsY * pixelsPerUnitY ); - m_targetWindow->SetVirtualSize( noUnitsX * pixelsPerUnitX, noUnitsY * pixelsPerUnitY ); - + if (!noRefresh) { int new_x = m_xScrollPixelsPerLine * m_xScrollPosition;