Author: gert
Date: 2007-01-03 03:51:58 -0500 (Wed, 03 Jan 2007)
New Revision: 70412
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Theme.cs
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlTest.cs
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/RichTextBoxTest.cs
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TextBoxTest.cs
Log:
* Theme.cs: Re-enabled DefaultFont change. Use const to refer to
System.Drawing assembly. Spaces to tabs. Removed extra tabs.
* ControlTest.cs: Enabled tests after DefaultFont change. Ignore test
that is DPI-dependent.
* RichTextBoxTest.cs: Ignore test that is DPI-dependent.
* TextBoxTest.cs: Ignore test that is DPI-dependent.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-01-03 06:38:04 UTC (rev 70411)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-01-03 08:51:58 UTC (rev 70412)
@@ -1,3 +1,8 @@
+2007-01-03 Gert Driesen <[EMAIL PROTECTED]>
+
+ * Theme.cs: Re-enabled DefaultFont change. Use const to refer to
+ System.Drawing assembly. Spaces to tabs. Removed extra tabs.
+
2007-01-02 Jackson Harper <[EMAIL PROTECTED]>
* TextBoxBase.cs: We move the caret with the split now, so we
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Theme.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Theme.cs
2007-01-03 06:38:04 UTC (rev 70411)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Theme.cs
2007-01-03 08:51:58 UTC (rev 70412)
@@ -24,7 +24,6 @@
// Peter Dennis Bartok, [EMAIL PROTECTED]
//
-
using System.Collections;
using System.Drawing;
using System.Drawing.Drawing2D;
@@ -56,7 +55,7 @@
internal static CPColor Empty;
}
- // Implements a pool of system resources
+ // Implements a pool of system resources
internal class SystemResPool
{
private Hashtable pens = new Hashtable ();
@@ -71,7 +70,7 @@
public Pen GetPen (Color color)
{
- int hash = color.ToArgb ();
+ int hash = color.ToArgb ();
lock (pens) {
Pen res = pens [hash] as Pen;
@@ -132,11 +131,11 @@
public HatchBrush GetHatchBrush (HatchStyle hatchStyle, Color
foreColor, Color backColor)
{
- string hash = hatchStyle.ToString () +
foreColor.ToString () + backColor.ToString ();
+ string hash = hatchStyle.ToString () +
foreColor.ToString () + backColor.ToString ();
lock (hatchbrushes) {
if (hatchbrushes.Contains (hash))
- return (HatchBrush) hatchbrushes[hash];
+ return (HatchBrush) hatchbrushes[hash];
HatchBrush brush = new HatchBrush (hatchStyle,
foreColor, backColor);
hatchbrushes.Add (hash, brush);
@@ -192,21 +191,18 @@
private readonly Font default_font;
protected Font window_border_font;
protected Color defaultWindowBackColor;
- protected Color defaultWindowForeColor;
+ protected Color defaultWindowForeColor;
protected bool always_draw_hotkeys = true;
internal SystemResPool ResPool = new SystemResPool ();
- private Type system_colors =
Type.GetType("System.Drawing.SystemColors, System.Drawing");
+ private Type system_colors = Type.GetType
("System.Drawing.SystemColors, " + Consts.AssemblySystem_Drawing);
protected Theme ()
{
-/*
#if NET_2_0
default_font = SystemFonts.DefaultFont;
#else
default_font = new Font (FontFamily.GenericSansSerif,
8.25f);
#endif
-*/
- default_font = new Font (FontFamily.GenericSansSerif,
8f);
}
private void SetSystemColors(string name, Color value) {
@@ -227,7 +223,7 @@
get;
}
- /* Default properties */
+ /* Default properties */
public virtual Color ColorScrollBar {
get { return SystemColors.ScrollBar;}
set { SetSystemColors("scroll_bar", value); }
@@ -373,7 +369,7 @@
}
public virtual Color DefaultWindowBackColor {
- get { return defaultWindowBackColor; }
+ get { return defaultWindowBackColor; }
}
public virtual Color DefaultWindowForeColor {
@@ -541,11 +537,11 @@
}
}
- public virtual Font WindowBorderFont {
- get {
- return window_border_font;
- }
- }
+ public virtual Font WindowBorderFont {
+ get {
+ return window_border_font;
+ }
+ }
public int Clamp (int value, int lower, int upper)
{
@@ -700,7 +696,7 @@
#endregion // CheckBox
#region CheckedListBox
- // Drawing
+ // Drawing
public abstract void DrawCheckedListBoxItem (CheckedListBox
ctrl, DrawItemEventArgs e);
#endregion // CheckedListBox
@@ -718,11 +714,11 @@
public abstract int DataGridMinimumColumnCheckBoxWidth { get; }
// Default colours
- public abstract Color DataGridAlternatingBackColor { get; }
- public abstract Color DataGridBackColor { get; }
+ public abstract Color DataGridAlternatingBackColor { get; }
+ public abstract Color DataGridBackColor { get; }
public abstract Color DataGridBackgroundColor { get; }
public abstract Color DataGridCaptionBackColor { get; }
- public abstract Color DataGridCaptionForeColor { get; }
+ public abstract Color DataGridCaptionForeColor { get; }
public abstract Color DataGridGridLineColor { get; }
public abstract Color DataGridHeaderBackColor { get; }
public abstract Color DataGridHeaderForeColor { get; }
@@ -779,8 +775,8 @@
#region ListBox
// Drawing
- public abstract void DrawListBoxItem (ListBox ctrl,
DrawItemEventArgs e);
- #endregion // ListBox
+ public abstract void DrawListBoxItem (ListBox ctrl,
DrawItemEventArgs e);
+ #endregion // ListBox
#region ListView
// Drawing
@@ -807,7 +803,7 @@
public abstract int CalcMenuBarSize (Graphics dc, Menu menu,
int width);
public abstract void DrawMenuBar (Graphics dc, Menu menu,
Rectangle rect);
public abstract void DrawMenuItem (MenuItem item,
DrawItemEventArgs e);
- public abstract void DrawPopupMenu (Graphics dc, Menu menu,
Rectangle cliparea, Rectangle rect);
+ public abstract void DrawPopupMenu (Graphics dc, Menu menu,
Rectangle cliparea, Rectangle rect);
#endregion // Menus
#region MonthCalendar
@@ -898,7 +894,7 @@
#region ToolTip
public abstract void DrawToolTip(Graphics dc, Rectangle
clip_rectangle, ToolTip.ToolTipWindow control);
public abstract Size ToolTipSize(ToolTip.ToolTipWindow tt,
string text);
- #endregion // ToolTip
+ #endregion // ToolTip
#region TrackBar
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
2007-01-03 06:38:04 UTC (rev 70411)
+++ trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
2007-01-03 08:51:58 UTC (rev 70412)
@@ -1,3 +1,10 @@
+2007-01-03 Gert Driesen <[EMAIL PROTECTED]>
+
+ * ControlTest.cs: Enabled tests after DefaultFont change. Ignore test
+ that is DPI-dependent.
+ * RichTextBoxTest.cs: Ignore test that is DPI-dependent.
+ * TextBoxTest.cs: Ignore test that is DPI-dependent.
+
2007-01-02 Gert Driesen <[EMAIL PROTECTED]>
* ControlTest.cs: Added FontHeight test.
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlTest.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlTest.cs
2007-01-03 06:38:04 UTC (rev 70411)
+++
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlTest.cs
2007-01-03 08:51:58 UTC (rev 70412)
@@ -445,7 +445,7 @@
}
[Test]
- [Category ("NotWorking")]
+ [Ignore ("Depends on specific DPI")]
public void FontHeightTest ()
{
MockControl c = new MockControl ();
@@ -453,7 +453,6 @@
}
[Test]
- [Category ("NotWorking")]
public void FontTest ()
{
Control c = new Control ();
@@ -1281,7 +1280,6 @@
}
[Test]
- [Category ("NotWorking")]
public void ResetFontTest ()
{
Control c = new Control ();
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/RichTextBoxTest.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/RichTextBoxTest.cs
2007-01-03 06:38:04 UTC (rev 70411)
+++
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/RichTextBoxTest.cs
2007-01-03 08:51:58 UTC (rev 70412)
@@ -174,6 +174,7 @@
}
[Test] // bug #80301
+ [Ignore ("Depends on specific DPI")]
public void PreferredHeight ()
{
RichTextBox rtb = new RichTextBox ();
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TextBoxTest.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TextBoxTest.cs
2007-01-03 06:38:04 UTC (rev 70411)
+++
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TextBoxTest.cs
2007-01-03 08:51:58 UTC (rev 70412)
@@ -261,6 +261,7 @@
}
[Test] // bug #80301
+ [Ignore ("Depends on specific DPI")]
public void PreferredHeight ()
{
textBox.Font = new Font ("Arial", 14);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches