Switch to compiler-tester
[mono.git] / mcs / class / Managed.Windows.Forms / System.Windows.Forms / ThemeWin32Classic.cs
index a14ed77911268c87bcd83f69c881a39f605db966..51578063651d83307705fa99b81eb2890830bf89 100644 (file)
@@ -856,6 +856,25 @@ namespace System.Windows.Forms
                
                #endregion ComboBox
                
+               #region Datagrid
+               public override int DataGridPreferredColumnWidth { get { return 75;} }
+               public override int DataGridMinimumColumnCheckBoxHeight { get { return 16;} }
+               public override int DataGridMinimumColumnCheckBoxWidth { get { return 16;} }
+               public override Color DataGridAlternatingBackColor { get { return ColorWindow;} }
+               public override Color DataGridBackgroundColor { get  { return ColorWindow;} }
+               public override Color DataGridCaptionBackColor { get  { return ColorActiveTitle;} }
+               public override Color DataGridCaptionForeColor { get  { return SystemColors.ActiveCaptionText;} }
+               public override Color DataGridGridLineColor { get { return SystemColors.Control;} }
+               public override Color DataGridHeaderBackColor { get  { return SystemColors.Control;} }
+               public override Color DataGridHeaderForeColor { get  { return SystemColors.ControlText;} }
+               public override Color DataGridLinkColor { get  { return SystemColors.HotTrack;} }
+               public override Color DataGridLinkHoverColor { get  { return SystemColors.HotTrack;} }
+               public override Color DataGridParentRowsBackColor { get  { return SystemColors.Control;} }
+               public override Color DataGridParentRowsForeColor { get  { return SystemColors.WindowText;} }
+               public override Color DataGridSelectionBackColor { get  { return ColorActiveTitle;} }
+               public override Color DataGridSelectionForeColor { get  { return ColorTitleText;} }
+               #endregion // Datagrid
+               
                #region DateTimePicker
        
                public override void DrawDateTimePicker (Graphics dc,  Rectangle clip_rectangle, DateTimePicker dtp) {
@@ -2994,6 +3013,16 @@ namespace System.Windows.Forms
                                }
 
                                interior = new Rectangle (bounds.Left + 2, bounds.Top + 2, bounds.Width - 4, bounds.Height - 4);
+
+                                
+                               StringFormat string_format = new StringFormat ();
+                               string_format.Alignment = StringAlignment.Center;
+                               string_format.LineAlignment = StringAlignment.Center;
+                               string_format.FormatFlags = StringFormatFlags.NoWrap;
+
+                               interior.Y++;
+                               dc.DrawString (page.Text, page.Font, ThemeEngine.Current.ResPool.GetSolidBrush (SystemColors.ControlText), interior, string_format);
+                               interior.Y--;
                        } else {
                                Pen light = ResPool.GetPen (ControlPaint.LightLight (tab.BackColor));
 
@@ -3415,19 +3444,16 @@ namespace System.Windows.Forms
                #endregion      // ToolBar
 
                #region ToolTip
-               public override void DrawToolTip(Graphics dc, Rectangle clip_rectangle, ToolTip tt) {
-                       Control control;
-
-                       control = tt.tooltip_window;
+               public override void DrawToolTip(Graphics dc, Rectangle clip_rectangle, ToolTip.ToolTipWindow control) {
                        dc.FillRectangle(ResPool.GetSolidBrush(this.ColorInfoWindow), control.client_rect);
                        dc.DrawRectangle(ResPool.GetPen(this.ColorWindowFrame), 0, 0, control.Width-1, control.Height-1);
-                       dc.DrawString(control.text, control.Font, ResPool.GetSolidBrush(this.ColorInfoText), control.client_rect, tt.tooltip_window.string_format);
+                       dc.DrawString(control.text, control.Font, ResPool.GetSolidBrush(this.ColorInfoText), control.client_rect, control.string_format);
                }
 
-               public override Size ToolTipSize(ToolTip tt, string text) {
+               public override Size ToolTipSize(ToolTip.ToolTipWindow tt, string text) {
                        SizeF   sizef;
 
-                       sizef = tt.tooltip_window.DeviceContext.MeasureString(text, tt.tooltip_window.Font);
+                       sizef = tt.DeviceContext.MeasureString(text, tt.Font);
                        return new Size((int)sizef.Width+2, (int)sizef.Height+3);               // Need space for the border
                }
                #endregion      // ToolTip
@@ -3616,6 +3642,8 @@ namespace System.Windows.Forms
                                }
                        }
                        
+                       outside.Dispose ();
+                       
                }
 
                /* 
@@ -3801,7 +3829,9 @@ namespace System.Windows.Forms
                                                                area.X + toptick_startpoint.X + inc, area.Y + toptick_startpoint.Y );
                                        }                       
                                }
-                       }                       
+                       }
+                       
+                       outside.Dispose ();                     
                }
 
                public override void DrawTrackBar (Graphics dc, Rectangle clip_rectangle, TrackBar tb) 
@@ -4983,6 +5013,9 @@ namespace System.Windows.Forms
 //                                             hatchBrush.Dispose();
 //                                     }
 
+                                       // Clear the background
+                                       graphics.FillRectangle (SystemBrushes.Control, rectangle);
+
                                        if ((State & DrawFrameControlStates.Pushed)!=0 || (State & DrawFrameControlStates.Checked)!=0) {
                                                graphics.DrawRectangle (ResPool.GetPen (ControlPaint.Dark (ColorButtonFace)), trace_rectangle);
                                        } else if ((State & DrawFrameControlStates.Flat)!=0) {