Implement the drawing of mixed-mode check boxes
authorSteven Boswell II <ulatekh@yahoo.com>
Tue, 24 Jul 2012 18:50:57 +0000 (20:50 +0200)
committerThomas Goldstein <stifu@free.fr>
Tue, 24 Jul 2012 18:51:11 +0000 (20:51 +0200)
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs

index 6c181421d46c58b371ae4f9098ab593f087bb173..522dec40ec616af384bc431f1c9406aabdaec3fb 100644 (file)
@@ -6673,7 +6673,12 @@ namespace System.Windows.Forms
 
                public override void CPDrawCheckBox (Graphics dc, Rectangle rectangle, ButtonState state)
                {
-                       Pen check_pen = Pens.Black;
+                       CPDrawCheckBoxInternal (dc, rectangle, state, false /* mixed */);
+               }
+
+               private void CPDrawCheckBoxInternal (Graphics dc, Rectangle rectangle, ButtonState state, bool mixed)
+               {
+                       Pen check_pen = (mixed) ? Pens.Gray : Pens.Black;
                        
                        Rectangle cb_rect = new Rectangle (rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height);
                        
@@ -7099,10 +7104,9 @@ namespace System.Windows.Forms
 
                }
 
-               [MonoInternalNote ("Does not respect Mixed")]
                public override void CPDrawMixedCheckBox (Graphics graphics, Rectangle rectangle, ButtonState state)
                {
-                       CPDrawCheckBox (graphics, rectangle, state);
+                       CPDrawCheckBoxInternal (graphics, rectangle, state, true /* mixed */);
                }
 
                public override void CPDrawRadioButton (Graphics dc, Rectangle rectangle, ButtonState state)