From 935331f6da1b697aca67a8336c90a747a77657f4 Mon Sep 17 00:00:00 2001 From: Guy Albertelli Date: Mon, 14 Jan 2002 18:32:42 +0000 Subject: [PATCH] Fix a gripper issue and the adjustment of bands when RBBS_FIXEDSIZE specified. --- dlls/comctl32/rebar.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c index 545b8a154be..133552b1226 100644 --- a/dlls/comctl32/rebar.c +++ b/dlls/comctl32/rebar.c @@ -20,7 +20,7 @@ /* - * Rebar control rev 8a + * Rebar control rev 8b * * Copyright 1998, 1999 Eric Kohl * @@ -88,6 +88,9 @@ * 15. Implement RBBS_CHILDEDGE, and set each bands "offChild" at _Layout * time. * 16. Fix REBARSPACE. It should depend on CCS_NODIVIDER. + * rev 8b + * 17. Fix determination of whether Gripper is needed in _ValidateBand. + * 18. Fix _AdjustBand processing of RBBS_FIXEDSIZE. * * * Still to do: @@ -705,7 +708,7 @@ REBAR_AdjustBands (REBAR_INFO *infoPtr, UINT rowstart, UINT rowend, lpBand->rcBand.left = x + xsep; /* compute new width */ - if (lpBand->hwndChild && extra) { + if ((lpBand->hwndChild && extra) && !(lpBand->fStyle & RBBS_FIXEDSIZE)) { /* set to the "current" band size less the header */ fudge = lpBand->ccx; last_adjusted = i; @@ -1853,6 +1856,8 @@ REBAR_ValidateBand (REBAR_INFO *infoPtr, REBAR_BAND *lpBand) { UINT header=0; UINT textheight=0; + INT i, nonfixed; + REBAR_BAND *tBand; lpBand->fStatus = 0; lpBand->lcx = 0; @@ -1889,10 +1894,18 @@ REBAR_ValidateBand (REBAR_INFO *infoPtr, REBAR_BAND *lpBand) /* Header is where the image, text and gripper exist */ /* in the band and preceed the child window. */ + /* count number of non-FIXEDSIZE and non-Hidden bands */ + nonfixed = 0; + for (i=0; iuNumBands; i++){ + tBand = &infoPtr->bands[i]; + if (!HIDDENBAND(tBand) && !(tBand->fStyle & RBBS_FIXEDSIZE)) + nonfixed++; + } + /* calculate gripper rectangle */ if ( (!(lpBand->fStyle & RBBS_NOGRIPPER)) && ( (lpBand->fStyle & RBBS_GRIPPERALWAYS) || - ( !(lpBand->fStyle & RBBS_FIXEDSIZE) && (infoPtr->uNumBands > 1))) + ( !(lpBand->fStyle & RBBS_FIXEDSIZE) && (nonfixed > 1))) ) { lpBand->fStatus |= HAS_GRIPPER; if (infoPtr->dwStyle & CCS_VERT)