Author: mkestner
Date: 2006-08-28 17:02:33 -0400 (Mon, 28 Aug 2006)
New Revision: 64498

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs
   
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs
Log:

2006-08-28  Mike Kestner  <[EMAIL PROTECTED]>

        * ListView.cs: remove a TODO. 
        * ThemeWin32Classic.cs: implement HideSelection support for ListView.
        [Fixes ListView part of #79166]


Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-08-28 20:58:23 UTC (rev 64497)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-08-28 21:02:33 UTC (rev 64498)
@@ -1,5 +1,11 @@
 2006-08-28  Mike Kestner  <[EMAIL PROTECTED]>
 
+       * ListView.cs: remove a TODO. 
+       * ThemeWin32Classic.cs: implement HideSelection support for ListView.
+       [Fixes ListView part of #79166]
+
+2006-08-28  Mike Kestner  <[EMAIL PROTECTED]>
+
        * ListView.cs: move wheel handler to parent since it is focused
        instead of the item_control now.  [Fixes #79177]
 

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs      
2006-08-28 20:58:23 UTC (rev 64497)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs      
2006-08-28 21:02:33 UTC (rev 64498)
@@ -26,7 +26,6 @@
 //
 // TODO:
 //   - Feedback for item activation, change in cursor types as mouse moves.
-//   - HideSelection
 //   - LabelEdit
 //   - Drag and drop
 

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs
===================================================================
--- 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs 
    2006-08-28 20:58:23 UTC (rev 64497)
+++ 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs 
    2006-08-28 21:02:33 UTC (rev 64498)
@@ -1751,6 +1751,8 @@
 
                        if (item.Selected && control.Focused)
                                dc.FillRectangle (SystemBrushes.Highlight, 
highlight_rect);
+                       else if (item.Selected && !control.HideSelection)
+                               dc.FillRectangle (SystemBrushes.Control, 
highlight_rect);
                        else
                                dc.FillRectangle (ResPool.GetSolidBrush 
(item.BackColor), text_rect);
                        
@@ -1805,12 +1807,20 @@
                                                        sub_item_font = 
subItem.Font;
                                                }
 
-                                               if (item.Selected && 
control.Focused && control.FullRowSelect) {
-                                                       dc.FillRectangle 
(SystemBrushes.Highlight, sub_item_rect);
+                                               if (item.Selected && 
(control.Focused || !control.HideSelection) && control.FullRowSelect) {
+                                                       Brush bg, text;
+                                                       if (control.Focused) {
+                                                               bg = 
SystemBrushes.Highlight;
+                                                               text = 
SystemBrushes.HighlightText;
+                                                       } else {
+                                                               bg = 
SystemBrushes.Control;
+                                                               text = 
sub_item_fore_br;
+                                                       }
+                                       
+                                                       dc.FillRectangle (bg, 
sub_item_rect);
                                                        if (subItem.Text != 
null && subItem.Text.Length > 0)
                                                                dc.DrawString 
(subItem.Text, sub_item_font,
-                                                                              
SystemBrushes.HighlightText,
-                                                                              
sub_item_text_rect, format);
+                                                                              
text, sub_item_text_rect, format);
                                                } else {
                                                        dc.FillRectangle 
(sub_item_back_br, sub_item_rect);
                                                        if (subItem.Text != 
null && subItem.Text.Length > 0)

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to