From 02ac0e4ead739c140ca2e28414b393a5d5b0e5c2 Mon Sep 17 00:00:00 2001 From: Carlos Alberto Cortez Date: Wed, 10 Jan 2007 20:16:55 +0000 Subject: 2007-01-10 Carlos Alberto Cortez * 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). svn path=/trunk/mcs/; revision=70809 --- .../System.Windows.Forms/ColumnHeader.cs | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'mcs/class/Managed.Windows.Forms/System.Windows.Forms/ColumnHeader.cs') diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ColumnHeader.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ColumnHeader.cs index 42d49d8e063..5644f363bc9 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ColumnHeader.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ColumnHeader.cs @@ -145,17 +145,18 @@ namespace System.Windows.Forms // text is wrappable only in LargeIcon and SmallIcon views format.FormatFlags = StringFormatFlags.NoWrap; - 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); + if (owner != null) + column_rect.Height = owner.Font.Height + 8; else - column_rect.Size = Size.Empty; + column_rect.Height = ThemeEngine.Current.DefaultFont.Height + 8; + + if (width >= 0) + column_rect.Width = width; + 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) -- cgit v1.2.3