Author: calberto
Date: 2007-05-04 21:18:14 -0400 (Fri, 04 May 2007)
New Revision: 76729

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs
Log:
2007-05-04  Carlos Alberto Cortez <[EMAIL PROTECTED]>

        * ThemeWin32Classic.cs: When drawing ListViewItems,
        use StringTrimming.EllipsisCharacter if the view is Tile, Details,
        or LargeIcon _and_ item is not focused (match .Net behaviour).



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-05-04 23:25:59 UTC (rev 76728)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-05-05 01:18:14 UTC (rev 76729)
@@ -1,3 +1,9 @@
+2007-05-04  Carlos Alberto Cortez <[EMAIL PROTECTED]>
+
+       * ThemeWin32Classic.cs: When drawing ListViewItems,
+       use StringTrimming.EllipsisCharacter if the view is Tile, Details,
+       or LargeIcon _and_ item is not focused (match .Net behaviour).
+
 2007-05-04  Jonathan Pobst  <[EMAIL PROTECTED]>
 
        * Control.cs, Form.cs: Fix some obsolete method warnings.

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs
===================================================================
--- 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs 
    2007-05-04 23:25:59 UTC (rev 76728)
+++ 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs 
    2007-05-05 01:18:14 UTC (rev 76729)
@@ -2416,15 +2416,20 @@
                        else
                                format.FormatFlags = StringFormatFlags.NoWrap;
 
+                       if ((control.View == View.LargeIcon && !item.Focused)
+                                       || control.View == View.Details 
+#if NET_2_0
+                                       || control.View == View.Tile
+#endif
+                          )
+                               format.Trimming = 
StringTrimming.EllipsisCharacter;
+
                        Rectangle highlight_rect = text_rect;
                        if (control.View == View.Details) { // Adjustments for 
Details view
                                Size text_size = Size.Ceiling (dc.MeasureString 
(item.Text, item.Font));
 
                                if (!control.FullRowSelect) // Selection 
shouldn't be outside the item bounds
                                        highlight_rect.Width = Math.Min 
(text_size.Width + 4, text_rect.Width);
-
-                               if (text_size.Width > text_rect.Width)
-                                       format.Trimming = 
StringTrimming.EllipsisCharacter;
                        }
 
                        if (item.Selected && control.Focused)

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

Reply via email to