REBAR: make sure the rebar size is above a minimum
Mike McCormack
mike at codeweavers.com
Thu Mar 18 23:48:11 CST 2004
ChangeLog:
* make sure the rebar size is above a minimum
-------------- next part --------------
Index: dlls/comctl32/rebar.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/rebar.c,v
retrieving revision 1.89
diff -u -r1.89 rebar.c
--- dlls/comctl32/rebar.c 16 Mar 2004 19:14:30 -0000 1.89
+++ dlls/comctl32/rebar.c 19 Mar 2004 05:01:02 -0000
@@ -299,6 +299,10 @@
/* either top or bottom */
#define REBAR_DIVIDER 2
+/* minimium vertical height of a normal bar */
+/* or minimum width of a CCS_VERT bar - from experiment on Win2k */
+#define REBAR_MINSIZE 23
+
/* This is the increment that is used over the band height */
#define REBARSPACE(a) ((a->fStyle & RBBS_CHILDEDGE) ? 2*REBAR_DIVIDER : 0)
@@ -1917,6 +1921,8 @@
y = clientcy;
}
if (infoPtr->dwStyle & CCS_VERT) {
+ if( x < REBAR_MINSIZE )
+ x = REBAR_MINSIZE;
infoPtr->calcSize.cx = x;
infoPtr->calcSize.cy = clientcy;
TRACE("vert, notify=%d, x=%d, origheight=%d\n",
@@ -1924,6 +1930,8 @@
if (notify && (x != origheight)) infoPtr->fStatus |= NTF_HGHTCHG;
}
else {
+ if( y < REBAR_MINSIZE )
+ y = REBAR_MINSIZE;
infoPtr->calcSize.cx = clientcx;
infoPtr->calcSize.cy = y;
TRACE("horz, notify=%d, y=%d, origheight=%d\n",
More information about the wine-patches
mailing list