Author: everaldo
Date: 2007-05-28 09:25:39 -0400 (Mon, 28 May 2007)
New Revision: 78057

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolBar.cs
Log:
2007-05-28  Everaldo Canuto  <[EMAIL PROTECTED]>

        * ToolBar.cs: Fix toolbar default width for button with image. Fixes
        #81733.



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-05-28 13:14:34 UTC (rev 78056)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-05-28 13:25:39 UTC (rev 78057)
@@ -1,3 +1,8 @@
+2007-05-28  Everaldo Canuto  <[EMAIL PROTECTED]>
+
+       * ToolBar.cs: Fix toolbar default width for button with image. Fixes
+       #81733.
+
 2007-05-28  Rolf Bjarne Kvinge <[EMAIL PROTECTED]> 
 
        * MonthCalendar.cs: Only mark the keypresses we actually handle as

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolBar.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolBar.cs       
2007-05-28 13:14:34 UTC (rev 78056)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolBar.cs       
2007-05-28 13:25:39 UTC (rev 78057)
@@ -1327,7 +1327,11 @@
                        if (button.Style == ToolBarButtonStyle.Separator)
                                return new Size (theme.ToolBarSeparatorWidth, 
ht);
 
-                       Size size = TextSize.IsEmpty ? toolbar.default_size : 
TextSize;
+                       Size size;
+                       if (TextSize.IsEmpty && (button.Image == null))
+                               size = toolbar.default_size;
+                       else
+                               size = TextSize;
                        
                        Size image_size = (toolbar.ImageSize == Size.Empty) ? 
new Size (16, 16) : toolbar.ImageSize;
 

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to