comctl32: rebar: Respect cyMinChild over client rectangle size. [PATCH 2/2]

Misha Koshelev mk144210 at bcm.tmc.edu
Sat Feb 17 19:06:16 CST 2007


This fixes bug #7464, making rebar respect cyMinChild over client size
as native comctl32 does. I see that rebar is undergoing a bunch of
changes so if the layout function is being rewritten this will probably
have to be rewritten as well... will have to see what gets committed.
But I think definitely the conformance tests should be committed so the
new code does not break these bugs.

Misha

p.s. Oh yeah and I didn't want to mess with cxMinChild as the bug does
not depend on this so I just left todo_wine's around that part of the
conformance test, but native comctl32 respects this too.
-------------- next part --------------
From 5ebb018135e10516aece34bebb78e1b668899732 Mon Sep 17 00:00:00 2001
From: Misha Koshelev <mk144210 at bcm.tmc.edu>
Date: Sat, 17 Feb 2007 18:50:01 -0600
Subject: comctl32: rebar: Respect cyMinChild over client rectangle size.
---
 dlls/comctl32/rebar.c       |    3 +++
 dlls/comctl32/tests/rebar.c |    2 +-
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c
index 4b2d2ab..97e5a79 100644
--- a/dlls/comctl32/rebar.c
+++ b/dlls/comctl32/rebar.c
@@ -1554,6 +1554,9 @@ REBAR_Layout (REBAR_INFO *infoPtr, LPREC
 			  i, mcy, adjcy, y);
 		}
 	    }
+
+	    /* but don't limit mcy below the minimum size for the band */
+	    if (mcy < lpBand->lcy) mcy = lpBand->lcy;
 	}
 
 	TRACE("P1 band %u, row %d, x=%d, y=%d, cxsep=%d, cx=%d\n",
diff --git a/dlls/comctl32/tests/rebar.c b/dlls/comctl32/tests/rebar.c
index 83a2fe3..19f0895 100644
--- a/dlls/comctl32/tests/rebar.c
+++ b/dlls/comctl32/tests/rebar.c
@@ -233,7 +233,7 @@ static void minchild_test(DWORD dwRebarS
     /* make sure rebar respects the minimums we passed */
     todo_wine ok(cx >= CHILD_SIZE, "Band cx expected to be >= %d but was %d, CCS_VERT%s set\n", 
        CHILD_SIZE, cx, (dwRebarStyle & CCS_VERT ? "" : " not"));
-    todo_wine ok(cy >= CHILD_SIZE, "Band cy expected to be >= %d but was %d, CCS_VERT%s set\n", 
+    ok(cy >= CHILD_SIZE, "Band cy expected to be >= %d but was %d, CCS_VERT%s set\n", 
        CHILD_SIZE, cy, (dwRebarStyle & CCS_VERT ? "" : " not"));       
 
     DestroyWindow(hRebar);    
-- 
1.4.1



More information about the wine-patches mailing list