]> git.saurik.com Git - wxWidgets.git/commitdiff
Revert patch again, as the scrollbars are now always shown.
authorRobert Roebling <robert@roebling.de>
Sat, 12 Feb 2005 12:36:12 +0000 (12:36 +0000)
committerRobert Roebling <robert@roebling.de>
Sat, 12 Feb 2005 12:36:12 +0000 (12:36 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31962 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/scrlwing.cpp
src/gtk/scrolwin.cpp
src/gtk1/scrolwin.cpp

index d97d6ab1bc46e85f4010a9c8f78a88c6ecc89b93..cd61575c370e548016ed92e27659cf7cb2bc1c9a 100644 (file)
@@ -653,7 +653,7 @@ void wxScrollHelper::AdjustScrollbars()
         else
         {
             int vVirt = m_targetWindow->GetVirtualSize().GetWidth();
-            m_xScrollLines = (vVirt+m_xScrollPixelsPerLine-1) / m_xScrollPixelsPerLine;
+            m_xScrollLines = vVirt / m_xScrollPixelsPerLine;
 
             // Calculate page size i.e. number of scroll units you get on the
             // current client window
@@ -687,7 +687,7 @@ void wxScrollHelper::AdjustScrollbars()
         else // might need scrolling
         {
             int hVirt = m_targetWindow->GetVirtualSize().GetHeight();
-            m_yScrollLines = (hVirt+m_yScrollPixelsPerLine-1) / m_yScrollPixelsPerLine;
+            m_yScrollLines = hVirt / m_yScrollPixelsPerLine;
 
             // Calculate page size i.e. number of scroll units you get on the
             // current client window
index 5ca8bd62d66c73140380551539b6515e369aa7e6..ba87c7596c6cadf590fd8fddb51ed6d97e827a26 100644 (file)
@@ -380,8 +380,8 @@ void wxScrolledWindow::AdjustScrollbars()
     }
     else
     {
-        m_hAdjust->upper = (vw+m_xScrollPixelsPerLine-1) / m_xScrollPixelsPerLine;
-        m_hAdjust->page_increment = (w / m_xScrollPixelsPerLine);
+        m_hAdjust->upper = vw / m_xScrollPixelsPerLine;
+        m_hAdjust->page_increment = w / m_xScrollPixelsPerLine;
         m_hAdjust->page_size = m_hAdjust->page_increment;
 
         // If the scrollbar hits the right side, move the window
@@ -408,8 +408,8 @@ void wxScrolledWindow::AdjustScrollbars()
     }
     else
     {
-        m_vAdjust->upper = (vh+m_yScrollPixelsPerLine-1) / m_yScrollPixelsPerLine;
-        m_vAdjust->page_increment = (h / m_yScrollPixelsPerLine);
+        m_vAdjust->upper = vh / m_yScrollPixelsPerLine;
+        m_vAdjust->page_increment = h / m_yScrollPixelsPerLine;
         m_vAdjust->page_size = m_vAdjust->page_increment;
 
         if ((m_vAdjust->value != 0.0) && (m_vAdjust->value + m_vAdjust->page_size > m_vAdjust->upper))
index 5ca8bd62d66c73140380551539b6515e369aa7e6..ba87c7596c6cadf590fd8fddb51ed6d97e827a26 100644 (file)
@@ -380,8 +380,8 @@ void wxScrolledWindow::AdjustScrollbars()
     }
     else
     {
-        m_hAdjust->upper = (vw+m_xScrollPixelsPerLine-1) / m_xScrollPixelsPerLine;
-        m_hAdjust->page_increment = (w / m_xScrollPixelsPerLine);
+        m_hAdjust->upper = vw / m_xScrollPixelsPerLine;
+        m_hAdjust->page_increment = w / m_xScrollPixelsPerLine;
         m_hAdjust->page_size = m_hAdjust->page_increment;
 
         // If the scrollbar hits the right side, move the window
@@ -408,8 +408,8 @@ void wxScrolledWindow::AdjustScrollbars()
     }
     else
     {
-        m_vAdjust->upper = (vh+m_yScrollPixelsPerLine-1) / m_yScrollPixelsPerLine;
-        m_vAdjust->page_increment = (h / m_yScrollPixelsPerLine);
+        m_vAdjust->upper = vh / m_yScrollPixelsPerLine;
+        m_vAdjust->page_increment = h / m_yScrollPixelsPerLine;
         m_vAdjust->page_size = m_vAdjust->page_increment;
 
         if ((m_vAdjust->value != 0.0) && (m_vAdjust->value + m_vAdjust->page_size > m_vAdjust->upper))