2006-04-15 Alexander Olk <alex.olk@googlemail.com>
authorAlexander Olk <aolk@mono-cvs.ximian.com>
Sat, 15 Apr 2006 20:43:40 +0000 (20:43 -0000)
committerAlexander Olk <aolk@mono-cvs.ximian.com>
Sat, 15 Apr 2006 20:43:40 +0000 (20:43 -0000)
* ThemeWin32Classic.cs: Draw disabled combo button in the correct
  place
* ComboBox.cs: If the combobox is disabled call CPDrawComboButton
  with the correct ButtonState

svn path=/trunk/mcs/; revision=59512

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

index c42b7ed180073df7d39c9601948eeaf956c66a4e..1ac962e730da753477e876344be601e57bae9287 100644 (file)
@@ -1,3 +1,10 @@
+2006-04-15  Alexander Olk  <alex.olk@googlemail.com>
+
+       * ThemeWin32Classic.cs: Draw disabled combo button in the correct
+         place
+       * ComboBox.cs: If the combobox is disabled call CPDrawComboButton
+         with the correct ButtonState
+
 2006-04-14  Peter Dennis Bartok  <pbartok@novell.com>
 
        * XplatUIX11.cs: Improved distinguishing between window types to
index d87c80b19675666daebfd60c79baa859eb91028b..22d036b5b9672f2533258721df6c329f9d9108f2 100644 (file)
@@ -1023,6 +1023,9 @@ namespace System.Windows.Forms
                                dc.FillRectangle (ThemeEngine.Current.ResPool.GetSolidBrush (ThemeEngine.Current.ColorControl),
                                        combobox_info.button_rect);
 
+                               if (!is_enabled)
+                                       combobox_info.button_status = ButtonState.Inactive;
+                               
                                ThemeEngine.Current.CPDrawComboButton (dc,
                                        combobox_info.button_rect, combobox_info.button_status);
                        }                       
index 1d8ee4af231be9e2aa8881eeb2f042b13d96d7f5..5f111716a239f337cd9898a9a9b26c9bc72194e3 100644 (file)
@@ -4476,21 +4476,20 @@ namespace System.Windows.Forms
                        arrow[0]=P1;
                        arrow[1]=P2;
                        arrow[2]=P3;
-
+                       
                        /* Draw the arrow */
                        if ((state & ButtonState.Inactive)!=0) {
-                               graphics.FillPolygon(SystemBrushes.ControlLightLight, arrow, FillMode.Winding);
-
                                /* Move away from the shadow */
-                               P1.X-=1;                P1.Y-=1;
-                               P2.X-=1;                P2.Y-=1;
-                               P3.X-=1;                P3.Y-=1;
+                               arrow[0].X += 1;        arrow[0].Y += 1;
+                               arrow[1].X += 1;        arrow[1].Y += 1;
+                               arrow[2].X += 1;        arrow[2].Y += 1;
+                               
+                               graphics.FillPolygon(SystemBrushes.ControlLightLight, arrow, FillMode.Winding);
 
                                arrow[0]=P1;
                                arrow[1]=P2;
                                arrow[2]=P3;
 
-
                                graphics.FillPolygon(SystemBrushes.ControlDark, arrow, FillMode.Winding);
                        } else {
                                graphics.FillPolygon(SystemBrushes.ControlText, arrow, FillMode.Winding);