diff src/toolbar-msw.c @ 284:558f606b08ae r21-0b40

Import from CVS: tag r21-0b40
author cvs
date Mon, 13 Aug 2007 10:34:13 +0200
parents 7df0dd720c89
children 57709be46d1b
line wrap: on
line diff
--- a/src/toolbar-msw.c	Mon Aug 13 10:33:19 2007 +0200
+++ b/src/toolbar-msw.c	Mon Aug 13 10:34:13 2007 +0200
@@ -155,12 +155,14 @@
   /* set button sizes based on bar size */
   if (vert)
     {
-      width = height = bar_width;
+      width = height = bar_width
+	- (window_frame_width + shadow_thickness) * 2; 
       bmwidth = bmheight = width - (border_width + shadow_thickness) * 2;
     }
   else
     {
-      height = width = bar_height - window_frame_width * 2; 
+      height = width = bar_height 
+	- (window_frame_width + shadow_thickness) * 2; 
       bmwidth = bmheight = width - (border_width + shadow_thickness) * 2; 
     }
 
@@ -336,13 +338,16 @@
       /* vertical toolbars need more rows */
       if (vert)
 	{
+	  RECT tmp;
 	  SendMessage (toolbarwnd, TB_SETROWS, 
-		       MAKEWPARAM(nbuttons, FALSE), 0);
+		       MAKEWPARAM(nbuttons, FALSE), (LPARAM)&tmp);
 	}
 
       else
 	{
-	  SendMessage (toolbarwnd, TB_SETROWS, MAKEWPARAM(1, FALSE), 0);
+	  RECT tmp;
+	  SendMessage (toolbarwnd, TB_SETROWS, MAKEWPARAM(1, FALSE), 
+		       (LPARAM)&tmp);
 	}
 
       /* finally populate with images */