[Mono-winforms-list] [PATCH] implementation for Theme.DrawSelectionFrame
Sergey Volk
sergey.volk at gmail.com
Tue May 8 13:47:50 EDT 2007
Oops, sorry, forgot attachment.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-winforms-list/attachments/20070508/e8459fab/attachment.html
-------------- next part --------------
Index: System.Windows.Forms/ControlPaint.cs
===================================================================
--- System.Windows.Forms/ControlPaint.cs (revision 76946)
+++ System.Windows.Forms/ControlPaint.cs (working copy)
@@ -421,14 +421,8 @@
ThemeEngine.Current.CPDrawScrollButton (graphics, rectangle, button, state);
}
- [MonoTODO]
- private static bool DSFNotImpl = false;
public static void DrawSelectionFrame(Graphics graphics, bool active, Rectangle outsideRect, Rectangle insideRect, Color backColor) {
- if (!DSFNotImpl) {
- DSFNotImpl = true;
- Console.WriteLine("NOT IMPLEMENTED: DrawSelectionFrame(Graphics graphics, bool active, Rectangle outsideRect, Rectangle insideRect, Color backColor)");
- }
- //throw new NotImplementedException();
+ ThemeEngine.Current.CPDrawSelectionFrame(graphics, active, outsideRect, insideRect, backColor);
}
public static void DrawSizeGrip (Graphics graphics, Color backColor, Rectangle bounds)
Index: System.Windows.Forms/ThemeWin32Classic.cs
===================================================================
--- System.Windows.Forms/ThemeWin32Classic.cs (revision 76946)
+++ System.Windows.Forms/ThemeWin32Classic.cs (working copy)
@@ -2262,8 +2262,7 @@
Rectangle box_select_rect = control.item_control.BoxSelectRectangle;
if (!box_select_rect.Size.IsEmpty)
- dc.DrawRectangle (ResPool.GetDashPen (ColorControlText, DashStyle.Dot), box_select_rect);
-
+ CPDrawSelectionFrame(dc, control.Focused, box_select_rect, box_select_rect, DefaultControlBackColor);
}
public override void DrawListViewHeader (Graphics dc, Rectangle clip, ListView control)
@@ -6407,7 +6406,7 @@
public override void CPDrawSelectionFrame (Graphics graphics, bool active, Rectangle outsideRect, Rectangle insideRect,
Color backColor) {
-
+ graphics.DrawRectangle(ResPool.GetDashPen(ColorControlText, DashStyle.Dot), outsideRect);
}
More information about the Mono-winforms-list
mailing list