Author: mkestner
Date: 2006-07-19 14:49:39 -0400 (Wed, 19 Jul 2006)
New Revision: 62764
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs
Log:
2006-07-19 Mike Kestner <[EMAIL PROTECTED]>
* ThemeWin32Classic.cs: use parent background color when drawing
flat toolbars. Restructure the conditionals to make sure non-flat
non-Divider toolbars are filled too. Fixes #78837.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-07-19 18:24:17 UTC (rev 62763)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-07-19 18:49:39 UTC (rev 62764)
@@ -1,5 +1,11 @@
2006-07-19 Mike Kestner <[EMAIL PROTECTED]>
+ * ThemeWin32Classic.cs: use parent background color when drawing
+ flat toolbars. Restructure the conditionals to make sure non-flat
+ non-Divider toolbars are filled too. Fixes #78837.
+
+2006-07-19 Mike Kestner <[EMAIL PROTECTED]>
+
* ListBox.cs: Sort on collection changes even if the handle
isn't created yet. Fixes #78813.
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs
2006-07-19 18:24:17 UTC (rev 62763)
+++
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs
2006-07-19 18:49:39 UTC (rev 62764)
@@ -3707,30 +3707,25 @@
if (clip_rectangle.Right == control.Right) {
dc.DrawLine (SystemPens.ControlDark,
clip_rectangle.Right - 1, 1, clip_rectangle.Right - 1, control.Bottom - 1);
}
- } else if (control.Divider) {
+ } else {
- if (control.Appearance ==
ToolBarAppearance.Flat &&
- control.Parent != null &&
control.Parent.BackgroundImage != null) {
- using (TextureBrush b = new
TextureBrush (control.Parent.BackgroundImage, WrapMode.Tile)) {
- dc.FillRectangle (b,
clip_rectangle);
+ if (control.Appearance ==
ToolBarAppearance.Flat && control.Parent != null) {
+ if (control.Parent.BackgroundImage !=
null) {
+ using (TextureBrush b = new
TextureBrush (control.Parent.BackgroundImage, WrapMode.Tile))
+ dc.FillRectangle (b,
clip_rectangle);
+ } else {
+ dc.FillRectangle
(ResPool.GetSolidBrush (control.Parent.BackColor), clip_rectangle);
}
} else {
dc.FillRectangle
(SystemBrushes.Control, clip_rectangle);
}
- if (clip_rectangle.Y < 2) {
+ if (control.Divider && clip_rectangle.Y < 2) {
if (clip_rectangle.Y < 1) {
dc.DrawLine
(SystemPens.ControlDark, clip_rectangle.X, 0, clip_rectangle.Right, 0);
}
dc.DrawLine
(SystemPens.ControlLightLight, clip_rectangle.X, 1, clip_rectangle.Right, 1);
}
- } else {
- if (control.Appearance ==
ToolBarAppearance.Flat &&
- control.Parent != null &&
control.Parent.BackgroundImage != null) {
- using (TextureBrush b = new
TextureBrush (control.Parent.BackgroundImage, WrapMode.Tile)) {
- dc.FillRectangle (b,
clip_rectangle);
- }
- }
}
foreach (ToolBarButton button in control.Buttons)
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches