diff options
author | Eric Maupin <ermaup@microsoft.com> | 2018-11-01 23:00:00 +0300 |
---|---|---|
committer | Eric Maupin <ermaup@microsoft.com> | 2018-11-12 22:17:15 +0300 |
commit | 68f93c1482b366a6556087696c6200e7ba00bafd (patch) | |
tree | 695d60261c2a54969c6718aadb027466d46df532 /Xamarin.PropertyEditing.Mac/PropertyEditorPanel.cs | |
parent | 3658aa413039fe4e5da928c31809f607d8b9dad6 (diff) |
[mac] Single column layout
Diffstat (limited to 'Xamarin.PropertyEditing.Mac/PropertyEditorPanel.cs')
-rw-r--r-- | Xamarin.PropertyEditing.Mac/PropertyEditorPanel.cs | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/Xamarin.PropertyEditing.Mac/PropertyEditorPanel.cs b/Xamarin.PropertyEditing.Mac/PropertyEditorPanel.cs index 5b45bba..e358c55 100644 --- a/Xamarin.PropertyEditing.Mac/PropertyEditorPanel.cs +++ b/Xamarin.PropertyEditing.Mac/PropertyEditorPanel.cs @@ -158,15 +158,11 @@ namespace Xamarin.PropertyEditing.Mac propertyTable.GridStyleMask = NSTableViewGridStyle.SolidHorizontalLine | NSTableViewGridStyle.SolidVerticalLine; #endif - var propertiesList = new NSTableColumn (PropertyListColId) { Title = LocalizationResources.PropertyColumnTitle }; - var propertyEditors = new NSTableColumn (PropertyEditorColId) { Title = LocalizationResources.ValueColumnTitle }; - propertiesList.Width = 158; - propertyEditors.Width = 250; - this.propertyTable.AddColumn (propertiesList); + var propertyEditors = new NSTableColumn (PropertyEditorColId); this.propertyTable.AddColumn (propertyEditors); // Set OutlineTableColumn or the arrows showing children/expansion will not be drawn - this.propertyTable.OutlineTableColumn = propertiesList; + this.propertyTable.OutlineTableColumn = propertyEditors; // create a table view and a scroll view var tableContainer = new NSScrollView { @@ -250,13 +246,16 @@ namespace Xamarin.PropertyEditing.Mac return true; } - public override CGRect FrameOfOutlineCellAtRow (nint row) + public override CGRect GetCellFrame (nint column, nint row) { - var obj = (NSObjectFacade)ItemAtRow (row); - if (obj.Target is IGroupingList<string, PropertyViewModel>) - return new CGRect (8, 11, 10, 10); + var super = base.GetCellFrame (column, row); + if (column == 0) { + var obj = (NSObjectFacade)ItemAtRow (row); + if (obj.Target is PropertyGroupViewModel) + return new CGRect (0, super.Top, super.Right - (super.Left / 2), super.Height); + } - return base.FrameOfOutlineCellAtRow (row); + return super; } } } |