Author: everaldo
Date: 2007-05-11 05:18:13 -0400 (Fri, 11 May 2007)
New Revision: 77208
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolBar.cs
Log:
* ToolBar.cs: Save default_size on create handle to use later for
buttons
without text, needed to mimic win32 behavior.
2007-05-11 Everaldo Canuto <[EMAIL PROTECTED]>
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-05-11 08:59:22 UTC (rev 77207)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-05-11 09:18:13 UTC (rev 77208)
@@ -1,5 +1,10 @@
2007-05-11 Everaldo Canuto <[EMAIL PROTECTED]>
+ * ToolBar.cs: Save default_size on create handle to use later for
buttons
+ without text, needed to mimic win32 behavior.
+
+2007-05-11 Everaldo Canuto <[EMAIL PROTECTED]>
+
* ToolBar.cs: Fix button layour to best fit width or height according to
vertical or not. Fixes #81524.
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-11 08:59:22 UTC (rev 77207)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolBar.cs
2007-05-11 09:18:13 UTC (rev 77208)
@@ -46,6 +46,7 @@
private bool size_specified = false;
private ToolBarItem current_item;
internal ToolBarItem[] items;
+ internal Size default_size;
#endregion Instance Variables
#region Events
@@ -451,6 +452,7 @@
protected override void CreateHandle ()
{
base.CreateHandle ();
+ default_size = CalcButtonSize ();
}
protected override void Dispose (bool disposing)
@@ -1316,7 +1318,8 @@
if (button.Style == ToolBarButtonStyle.Separator)
return new Size (theme.ToolBarSeparatorWidth,
ht);
- Size size = TextSize;
+ Size size = TextSize.IsEmpty ? toolbar.default_size :
TextSize;
+
Size image_size = (toolbar.ImageSize == Size.Empty) ?
new Size (16, 16) : toolbar.ImageSize;
int image_width = image_size.Width + 2 *
theme.ToolBarImageGripWidth;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches