Toolbar button size fix

Duane Clark dclark at akamail.com
Tue Aug 26 19:34:28 CDT 2003


Changelog:
	Button width should be the larger of text width/bitmap width

-------------- next part --------------
Index: dlls/comctl32/toolbar.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/toolbar.c,v
retrieving revision 1.134
diff -u -r1.134 toolbar.c
--- dlls/comctl32/toolbar.c	18 Jun 2003 03:30:41 -0000	1.134
+++ dlls/comctl32/toolbar.c	27 Aug 2003 00:28:05 -0000
@@ -1443,9 +1443,13 @@
 	      /* Fudge amount measured against IE4 "menu" and "Links" */
 	      /* toolbars with native control (v4.71).  -  GA 8/01    */
               cx = sz.cx + 6 + 5 + 5;
-	      if ((dwStyle & TBSTYLE_LIST) &&
-		  (TOOLBAR_TestImageExist (infoPtr, btnPtr, GETDEFIMAGELIST(infoPtr,0))))
-		  cx += infoPtr->nBitmapWidth;
+              if (TOOLBAR_TestImageExist (infoPtr, btnPtr, GETDEFIMAGELIST(infoPtr,0)))
+              {
+                if (dwStyle & TBSTYLE_LIST)
+                  cx += infoPtr->nBitmapWidth;
+                else if (cx < (infoPtr->nBitmapWidth+7))
+                  cx = infoPtr->nBitmapWidth+7;
+              }
             }
             else
 	      cx = infoPtr->nButtonWidth;


More information about the wine-patches mailing list