Author: jpobst
Date: 2008-02-04 11:14:00 -0500 (Mon, 04 Feb 2008)
New Revision: 94755
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs
Log:
2008-02-03 Jonathan Pobst <[EMAIL PROTECTED]>
* ThemeWin32Classic.cs: For MonthCalendar, draw a dark border
if its part of a DateTimePicker, else, use the back color.
[Fixes bug #358339]
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2008-02-04 16:00:25 UTC (rev 94754)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2008-02-04 16:14:00 UTC (rev 94755)
@@ -1,5 +1,11 @@
2008-02-03 Jonathan Pobst <[EMAIL PROTECTED]>
+ * ThemeWin32Classic.cs: For MonthCalendar, draw a dark border
+ if its part of a DateTimePicker, else, use the back color.
+ [Fixes bug #358339]
+
+2008-02-03 Jonathan Pobst <[EMAIL PROTECTED]>
+
* Hwnd.cs: Use GraphicContext instead of the uninitialized bmp_g.
[Fixes bug #358342]
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs
2008-02-04 16:00:25 UTC (rev 94754)
+++
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs
2008-02-04 16:14:00 UTC (rev 94755)
@@ -3328,12 +3328,19 @@
}
}
+ Brush border_brush;
+
+ if (mc.owner == null)
+ border_brush = GetControlBackBrush
(mc.BackColor);
+ else
+ border_brush = SystemBrushes.ControlDarkDark;
+
// finally paint the borders of the calendars as
required
for (int i = 0; i <= mc.CalendarDimensions.Width; i++) {
if (i == 0 && clip_rectangle.X ==
client_rectangle.X) {
- dc.FillRectangle (GetControlBackBrush
(mc.BackColor), client_rectangle.X, client_rectangle.Y, 1,
client_rectangle.Height);
+ dc.FillRectangle (border_brush,
client_rectangle.X, client_rectangle.Y, 1, client_rectangle.Height);
} else if (i == mc.CalendarDimensions.Width &&
clip_rectangle.Right == client_rectangle.Right) {
- dc.FillRectangle (GetControlBackBrush
(mc.BackColor), client_rectangle.Right-1, client_rectangle.Y, 1,
client_rectangle.Height);
+ dc.FillRectangle (border_brush,
client_rectangle.Right - 1, client_rectangle.Y, 1, client_rectangle.Height);
} else {
Rectangle rect = new Rectangle (
client_rectangle.X +
(month_size.Width*i) + (calendar_spacing.Width * (i-1)) + 1,
@@ -3341,15 +3348,15 @@
calendar_spacing.Width,
client_rectangle.Height);
if (i < mc.CalendarDimensions.Width &&
i > 0 && clip_rectangle.IntersectsWith (rect)) {
- dc.FillRectangle
(GetControlBackBrush (mc.BackColor), rect);
+ dc.FillRectangle (border_brush,
rect);
}
}
}
for (int i = 0; i <= mc.CalendarDimensions.Height; i++)
{
if (i == 0 && clip_rectangle.Y ==
client_rectangle.Y) {
- dc.FillRectangle (GetControlBackBrush
(mc.BackColor), client_rectangle.X, client_rectangle.Y, client_rectangle.Width,
1);
+ dc.FillRectangle (border_brush,
client_rectangle.X, client_rectangle.Y, client_rectangle.Width, 1);
} else if (i == mc.CalendarDimensions.Height &&
clip_rectangle.Bottom == client_rectangle.Bottom) {
- dc.FillRectangle (GetControlBackBrush
(mc.BackColor), client_rectangle.X, client_rectangle.Bottom-1,
client_rectangle.Width, 1);
+ dc.FillRectangle (border_brush,
client_rectangle.X, client_rectangle.Bottom - 1, client_rectangle.Width, 1);
} else {
Rectangle rect = new Rectangle (
client_rectangle.X,
@@ -3357,7 +3364,7 @@
client_rectangle.Width,
calendar_spacing.Height);
if (i < mc.CalendarDimensions.Height &&
i > 0 && clip_rectangle.IntersectsWith (rect)) {
- dc.FillRectangle
(GetControlBackBrush (mc.BackColor), rect);
+ dc.FillRectangle (border_brush,
rect);
}
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches