Paint toolbar toggle button background with dotted brush
authorEveraldo Canuto <everaldo@mono-cvs.ximian.com>
Wed, 29 Nov 2006 07:26:30 +0000 (07:26 -0000)
committerEveraldo Canuto <everaldo@mono-cvs.ximian.com>
Wed, 29 Nov 2006 07:26:30 +0000 (07:26 -0000)
svn path=/trunk/mcs/; revision=68645

mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs

index e99604ff608a077a2103d7a57e980d664b30ef3a..e0ba4b1fa2a5526c0ee7edc29aedcc0ce1b3663a 100644 (file)
@@ -1,3 +1,8 @@
+2006-11-28  Everaldo Canuto  <everaldo@simios.org>
+
+       * ThemeWin32Classic.cs: Paint toolbar toggle button background 
+       with dotted brush.      Fixes #79564
+       
 2006-11-28  Andreia Gaita  <avidigal@novell.com>
 
        * Form.cs: Removed call to UpdateBounds on Form
index 680bf8a90e4fa2badc48c749af7f4fe62d2e8aa0..b6244417bbb8061447d74865f9174f43f63f32fa 100644 (file)
@@ -4063,18 +4063,21 @@ namespace System.Windows.Forms
 
                protected virtual void DrawToolBarToggleButtonBackground (Graphics dc, ToolBarButton button)
                {
+                       Brush brush;
                        Rectangle area = button.Rectangle;
                        area.X += ToolBarImageGripWidth;
                        area.Y += ToolBarImageGripWidth;
                        area.Width -= 2 * ToolBarImageGripWidth;
                        area.Height -= 2 * ToolBarImageGripWidth;
-
+                       
                        if (button.Pushed)
-                               dc.FillRectangle (SystemBrushes.ControlLightLight, area);
+                               brush = (Brush) ResPool.GetHatchBrush (HatchStyle.Percent50, ColorScrollBar, ColorControlLightLight);
                        else if (button.PartialPush)
-                               dc.FillRectangle (SystemBrushes.ControlLight, area);
+                               brush = SystemBrushes.ControlLight;
                        else
-                               dc.FillRectangle (SystemBrushes.Control, area);
+                               brush = SystemBrushes.Control;
+                        
+                       dc.FillRectangle (brush, area);
                }
 
                protected virtual void DrawToolBarDropDownArrow (Graphics dc, ToolBarButton button, bool is_flat)