toolbar: maxtextrows

Huw D M Davies h.davies1 at physics.ox.ac.uk
Tue Feb 10 15:17:33 CST 2004


	Huw Davies <huw at codeweavers.com>
	Honour TB_SETMAXTEXTROWS
Index: dlls/comctl32/toolbar.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/toolbar.c,v
retrieving revision 1.154
diff -u -r1.154 toolbar.c
--- dlls/comctl32/toolbar.c	10 Feb 2004 20:08:45 -0000	1.154
+++ dlls/comctl32/toolbar.c	10 Feb 2004 21:13:49 -0000
@@ -1164,6 +1164,9 @@
     lpSize->cx = 0;
     lpSize->cy = 0;
 
+    if(infoPtr->nMaxTextRows == 0)
+        return;
+
     hdc = GetDC (hwnd);
     hOldFont = SelectObject (hdc, infoPtr->hFont);
 
@@ -1415,13 +1418,13 @@
             else
                 infoPtr->nButtonHeight = sizeString.cy + 6;
         }
-        else if (infoPtr->nButtonHeight < infoPtr->nBitmapHeight + 6)
+        else
 	    infoPtr->nButtonHeight = infoPtr->nBitmapHeight + 6;
 
         if (sizeString.cx > infoPtr->nBitmapWidth)
 	    infoPtr->nButtonWidth = sizeString.cx + 6;
-        else if (infoPtr->nButtonWidth < infoPtr->nBitmapWidth + 6)
-	    infoPtr->nButtonWidth = infoPtr->nBitmapWidth + 6;
+        else
+            infoPtr->nButtonWidth = infoPtr->nBitmapWidth + 6;
     }
 
     if ( infoPtr->cxMin >= 0 && infoPtr->nButtonWidth < infoPtr->cxMin )
@@ -1528,7 +1531,7 @@
             else
 	      cx = infoPtr->nButtonWidth;
 
-	    if (hasDropDownArrows && (btnPtr->fsStyle & BTNS_DROPDOWN))
+	    if ((hasDropDownArrows && (btnPtr->fsStyle & BTNS_DROPDOWN)) || (btnPtr->fsStyle & BTNS_WHOLEDROPDOWN))
 	      cx += DDARROW_WIDTH;
 	}
 	if (btnPtr->fsState & TBSTATE_WRAP )
@@ -4458,6 +4461,7 @@
 
     infoPtr->nMaxTextRows = (INT)wParam;
 
+    TOOLBAR_CalcToolbar(hwnd);
     return TRUE;
 }
 



More information about the wine-patches mailing list