[BROWSEUI]
authorGiannis Adamopoulos <gadamopoulos@reactos.org>
Thu, 18 Aug 2016 13:24:16 +0000 (13:24 +0000)
committerGiannis Adamopoulos <gadamopoulos@reactos.org>
Thu, 18 Aug 2016 13:24:16 +0000 (13:24 +0000)
- CInternetToolbar: Fix resizing the top rebar. Works in windows (but not in ros).

svn path=/trunk/; revision=72326

reactos/dll/win32/browseui/internettoolbar.cpp

index b6ca370..64393af 100644 (file)
@@ -646,9 +646,9 @@ HRESULT CInternetToolbar::ReserveBorderSpace(LONG maxHeight)
     if (FAILED_UNEXPECTEDLY(hResult))
         return hResult;
 
-    if (availableBorderSpace.top > maxHeight)
+    if (maxHeight && availableBorderSpace.bottom - availableBorderSpace.top > maxHeight)
     {
-        availableBorderSpace.top = maxHeight;
+        availableBorderSpace.bottom = availableBorderSpace.top + maxHeight;
     }
 
     return ResizeBorderDW(&availableBorderSpace, fSite, FALSE);
@@ -742,7 +742,7 @@ HRESULT CInternetToolbar::LockUnlockToolbars(bool locked)
                 SendMessage(fMainReBar, RB_SETBANDINFOW, x, (LPARAM)&rebarBandInfo);
             }
         }
-        hResult = ReserveBorderSpace();
+        hResult = ReserveBorderSpace(0);
 
         // TODO: refresh view menu?
     }