Author: calberto
Date: 2007-01-10 15:16:55 -0500 (Wed, 10 Jan 2007)
New Revision: 70809
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ColumnHeader.cs
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs
Log:
2007-01-10 Carlos Alberto Cortez <[EMAIL PROTECTED]>
* ListView.cs: Add more text padding space when using
auto resize for columns (the previous value didn't work fine).
* ThemeWin32Classic.cs: Update text position inside columns,
to match the appeareance of .Net.
* ColumnHeader.cs: When using auto resize, only the Width should
depend on the sub items, not the Height. Also, set width after
auto resizing (the value of Width should never remain as -1 or -2).
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-01-10 19:55:08 UTC (rev 70808)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-01-10 20:16:55 UTC (rev 70809)
@@ -1,3 +1,15 @@
+2007-01-10 Carlos Alberto Cortez <[EMAIL PROTECTED]>
+
+ * ListView.cs: Add more text padding space when using
+ auto resize for columns (the previous value didn't work fine).
+
+ * ThemeWin32Classic.cs: Update text position inside columns,
+ to match the appeareance of .Net.
+
+ * ColumnHeader.cs: When using auto resize, only the Width should
+ depend on the sub items, not the Height. Also, set width after
+ auto resizing (the value of Width should never remain as -1 or -2).
+
2007-01-10 Chris Toshok <[EMAIL PROTECTED]>
* Application.cs: fix compilation errors when debug is enabled.
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ColumnHeader.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ColumnHeader.cs
2007-01-10 19:55:08 UTC (rev 70808)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ColumnHeader.cs
2007-01-10 20:16:55 UTC (rev 70809)
@@ -145,17 +145,18 @@
// text is wrappable only in LargeIcon and SmallIcon
views
format.FormatFlags = StringFormatFlags.NoWrap;
- if (width >= 0) {
+ if (owner != null)
+ column_rect.Height = owner.Font.Height + 8;
+ else
+ column_rect.Height =
ThemeEngine.Current.DefaultFont.Height + 8;
+
+ if (width >= 0)
column_rect.Width = width;
- if (owner != null)
- column_rect.Height = owner.Font.Height
+ 5 ;
- else
- column_rect.Height =
ThemeEngine.Current.DefaultFont.Height + 5;
- }
- else if (Index != -1)
- column_rect.Size = owner.GetChildColumnSize
(Index);
- else
- column_rect.Size = Size.Empty;
+ else if (Index != -1) {
+ column_rect.Width = owner.GetChildColumnSize
(Index).Width;
+ width = column_rect.Width;
+ } else
+ column_rect.Width = 0;
}
internal void SetListView (ListView list_view)
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs
2007-01-10 19:55:08 UTC (rev 70808)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs
2007-01-10 20:16:55 UTC (rev 70809)
@@ -760,7 +760,7 @@
Refresh ();
}
- const int text_padding = 5;
+ const int text_padding = 15;
internal Size GetChildColumnSize (int index)
{
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs
2007-01-10 19:55:08 UTC (rev 70808)
+++
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs
2007-01-10 20:16:55 UTC (rev 70809)
@@ -1754,10 +1754,11 @@
else
state =
ButtonState.Flat;
this.CPDrawButton (dc, rect,
state);
- rect.X += 3;
- rect.Width -= 8;
+ rect.X += 8;
+ rect.Width -= 13;
if (rect.Width <= 0)
continue;
+
dc.DrawString (col.Text,
DefaultFont,
SystemBrushes.ControlText,
rect,
col.Format);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches