Skip to content
This repository has been archived by the owner on Sep 25, 2024. It is now read-only.

[Mac] Initial Variations implementation #600

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions Xamarin.PropertyEditing.Mac/Controls/BasePathEditorControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ internal abstract class BasePathEditorControl<T> : PropertyEditorControl<Propert
protected BasePathEditorControl (IHostResourceProvider hostResource)
: base (hostResource)
{
this.currentTextField = new TextFieldSmallButtonContainer ();
this.currentTextField = new TextFieldSmallButtonContainer {
ControlSize = NSControlSize.Small,
Font = NSFont.SystemFontOfSize (NSFont.SystemFontSizeForControlSize (NSControlSize.Small)),
};
this.currentTextField.Changed += CurrentTextField_Changed;
AddSubview (this.currentTextField);

Expand Down Expand Up @@ -72,9 +75,8 @@ protected BasePathEditorControl (IHostResourceProvider hostResource)

AddConstraints (new[] {
NSLayoutConstraint.Create (this.currentTextField, NSLayoutAttribute.Left, NSLayoutRelation.Equal, this, NSLayoutAttribute.Left, 1, 0f),
NSLayoutConstraint.Create (this.currentTextField, NSLayoutAttribute.CenterY, NSLayoutRelation.Equal, this, NSLayoutAttribute.CenterY, 1, 0f),
NSLayoutConstraint.Create (this.currentTextField, NSLayoutAttribute.Bottom, NSLayoutRelation.Equal, this, NSLayoutAttribute.Bottom, 1, -2f),
NSLayoutConstraint.Create (this.currentTextField, NSLayoutAttribute.Width, NSLayoutRelation.Equal, this, NSLayoutAttribute.Width, 1, 0f),
NSLayoutConstraint.Create (this.currentTextField, NSLayoutAttribute.Height, NSLayoutRelation.Equal, this, NSLayoutAttribute.Height, 1, -6f),
});
}

Expand Down Expand Up @@ -113,7 +115,7 @@ protected override void SetEnabled ()
{
this.currentTextField.Enabled =
this.browsePathButton.Enabled =
this.revealPathButton.Enabled = ViewModel.Property.CanWrite;
this.revealPathButton.Enabled = ViewModel.IsInputEnabled;
}

protected override void Dispose (bool disposing)
Expand Down
25 changes: 13 additions & 12 deletions Xamarin.PropertyEditing.Mac/Controls/BasePointEditorControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ internal abstract class BasePointEditorControl<T> : PropertyEditorControl<Proper
public override NSView FirstKeyView => XEditor;
public override NSView LastKeyView => YEditor.DecrementButton;

protected override nint BaseHeight => 36;

protected BasePointEditorControl (IHostResourceProvider hostResources)
: base (hostResources)
{
Expand All @@ -26,6 +28,7 @@ protected BasePointEditorControl (IHostResourceProvider hostResources)

XEditor = new NumericSpinEditor<T> (hostResources) {
BackgroundColor = NSColor.Clear,
Tag = 1,
Value = 0.0f
};
XEditor.ValueChanged += OnInputUpdated;
Expand All @@ -46,23 +49,21 @@ protected BasePointEditorControl (IHostResourceProvider hostResources)
AddSubview (YLabel);
AddSubview (YEditor);

const float editorHeight = 18;
this.AddConstraints (new[] {
NSLayoutConstraint.Create (XEditor, NSLayoutAttribute.Top, NSLayoutRelation.Equal, this, NSLayoutAttribute.Top, 1f, 3f),
nfloat labelHeight = NSFont.SystemFontSizeForControlSize (NSControlSize.Small);
AddConstraints (new[] {
NSLayoutConstraint.Create (XLabel, NSLayoutAttribute.Bottom, NSLayoutRelation.Equal, this, NSLayoutAttribute.Bottom, 1f, BottomOffset + 1),
NSLayoutConstraint.Create (XLabel, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, labelHeight),

NSLayoutConstraint.Create (XEditor, NSLayoutAttribute.Bottom, NSLayoutRelation.Equal, XLabel, NSLayoutAttribute.Top, 1f, -1f),
NSLayoutConstraint.Create (XEditor, NSLayoutAttribute.Left, NSLayoutRelation.Equal, this, NSLayoutAttribute.Left, 1f, 0f),
NSLayoutConstraint.Create (XEditor, NSLayoutAttribute.Right, NSLayoutRelation.Equal, YEditor, NSLayoutAttribute.Left, 1f, -10f),
NSLayoutConstraint.Create (XEditor, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, editorHeight),

NSLayoutConstraint.Create (XLabel, NSLayoutAttribute.Top, NSLayoutRelation.Equal, XEditor, NSLayoutAttribute.Bottom, 1f, -4f),
NSLayoutConstraint.Create (XLabel, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, editorHeight),

NSLayoutConstraint.Create (YEditor, NSLayoutAttribute.Top, NSLayoutRelation.Equal, this, NSLayoutAttribute.Top, 1f, 3f),
NSLayoutConstraint.Create (YEditor, NSLayoutAttribute.Bottom, NSLayoutRelation.Equal, YLabel, NSLayoutAttribute.Top, 1f, -1f),
NSLayoutConstraint.Create (YEditor, NSLayoutAttribute.Right, NSLayoutRelation.Equal, this, NSLayoutAttribute.Right, 1f, 0),
NSLayoutConstraint.Create (YEditor, NSLayoutAttribute.Width, NSLayoutRelation.Equal, XEditor, NSLayoutAttribute.Width, 1f, 0f),
NSLayoutConstraint.Create (YEditor, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, editorHeight),

NSLayoutConstraint.Create (YLabel, NSLayoutAttribute.Top, NSLayoutRelation.Equal, XLabel, NSLayoutAttribute.Top, 1f, 0f),
NSLayoutConstraint.Create (YLabel, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, editorHeight),
NSLayoutConstraint.Create (YLabel, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, labelHeight),

NSLayoutConstraint.Create (XLabel, NSLayoutAttribute.CenterX, NSLayoutRelation.Equal, XEditor.Subviews[0], NSLayoutAttribute.CenterX, 1f, 0),
NSLayoutConstraint.Create (YLabel, NSLayoutAttribute.CenterX, NSLayoutRelation.Equal, YEditor.Subviews[0], NSLayoutAttribute.CenterX, 1f, 0),
Expand All @@ -73,8 +74,8 @@ protected BasePointEditorControl (IHostResourceProvider hostResources)

protected override void SetEnabled ()
{
XEditor.Enabled = ViewModel.Property.CanWrite;
YEditor.Enabled = ViewModel.Property.CanWrite;
XEditor.Enabled =
YEditor.Enabled = ViewModel.IsInputEnabled;
}

protected override void UpdateAccessibilityValues ()
Expand Down
60 changes: 30 additions & 30 deletions Xamarin.PropertyEditing.Mac/Controls/BaseRectangleEditorControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ internal abstract class BaseRectangleEditorControl<T> : PropertyEditorControl<Pr
public override NSView FirstKeyView => XEditor;
public override NSView LastKeyView => HeightEditor.DecrementButton;

protected override nint BaseHeight => 68;

protected BaseRectangleEditorControl (IHostResourceProvider hostResources)
: base (hostResources)
{
Expand All @@ -31,6 +33,7 @@ protected BaseRectangleEditorControl (IHostResourceProvider hostResources)
};
XEditor = new NumericSpinEditor<T> (hostResources) {
BackgroundColor = NSColor.Clear,
Tag = 1,
Value = 0.0f
};
XEditor.ValueChanged += OnInputUpdated;
Expand Down Expand Up @@ -74,44 +77,41 @@ protected BaseRectangleEditorControl (IHostResourceProvider hostResources)
AddSubview (HeightLabel);
AddSubview (HeightEditor);

this.AddConstraints (new[] {
NSLayoutConstraint.Create (XEditor, NSLayoutAttribute.Top, NSLayoutRelation.Equal, this, NSLayoutAttribute.Top, 1f, 3f),
NSLayoutConstraint.Create (XEditor, NSLayoutAttribute.Left, NSLayoutRelation.Equal, this, NSLayoutAttribute.Left, 1f, 0f),
NSLayoutConstraint.Create (XEditor, NSLayoutAttribute.Right, NSLayoutRelation.Equal, YEditor, NSLayoutAttribute.Left, 1f, -10f),
NSLayoutConstraint.Create (XEditor, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, 18),

NSLayoutConstraint.Create (XLabel, NSLayoutAttribute.Top, NSLayoutRelation.Equal, XEditor, NSLayoutAttribute.Bottom, 1f, -4f),
NSLayoutConstraint.Create (XLabel, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, 18),

NSLayoutConstraint.Create (YEditor, NSLayoutAttribute.Top, NSLayoutRelation.Equal, this, NSLayoutAttribute.Top, 1f, 3f),
NSLayoutConstraint.Create (YEditor, NSLayoutAttribute.Right, NSLayoutRelation.Equal, this, NSLayoutAttribute.Right, 1f, 0),
NSLayoutConstraint.Create (YEditor, NSLayoutAttribute.Width, NSLayoutRelation.Equal, XEditor, NSLayoutAttribute.Width, 1f, 0f),
NSLayoutConstraint.Create (YEditor, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, 18),

NSLayoutConstraint.Create (YLabel, NSLayoutAttribute.Top, NSLayoutRelation.Equal, XLabel, NSLayoutAttribute.Top, 1f, 0f),
NSLayoutConstraint.Create (YLabel, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, 18),
nfloat labelHeight = NSFont.SystemFontSizeForControlSize (NSControlSize.Small);
AddConstraints (new[] {
NSLayoutConstraint.Create (WidthLabel, NSLayoutAttribute.Bottom, NSLayoutRelation.Equal, this, NSLayoutAttribute.Bottom, 1f, BottomOffset + 1),
NSLayoutConstraint.Create (WidthLabel, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, labelHeight),

NSLayoutConstraint.Create (WidthEditor, NSLayoutAttribute.Top, NSLayoutRelation.Equal, this, NSLayoutAttribute.Top, 1f, 33f),
NSLayoutConstraint.Create (WidthEditor, NSLayoutAttribute.Bottom, NSLayoutRelation.Equal, WidthLabel, NSLayoutAttribute.Top, 1f, -1f),
NSLayoutConstraint.Create (WidthEditor, NSLayoutAttribute.Left, NSLayoutRelation.Equal, this, NSLayoutAttribute.Left, 1f, 0f),
NSLayoutConstraint.Create (WidthEditor, NSLayoutAttribute.Right, NSLayoutRelation.Equal, HeightEditor, NSLayoutAttribute.Left, 1f, -10f),
NSLayoutConstraint.Create (WidthEditor, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, 18),

NSLayoutConstraint.Create (WidthLabel, NSLayoutAttribute.Top, NSLayoutRelation.Equal, WidthEditor, NSLayoutAttribute.Bottom, 1f, -4f),
NSLayoutConstraint.Create (WidthLabel, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, 18),

NSLayoutConstraint.Create (HeightEditor, NSLayoutAttribute.Top, NSLayoutRelation.Equal, WidthEditor, NSLayoutAttribute.Top, 1f, 0f),
NSLayoutConstraint.Create (HeightEditor, NSLayoutAttribute.Bottom, NSLayoutRelation.Equal, HeightLabel, NSLayoutAttribute.Top, 1f, -1f),
NSLayoutConstraint.Create (HeightEditor, NSLayoutAttribute.Right, NSLayoutRelation.Equal, this, NSLayoutAttribute.Right, 1f, 0),
NSLayoutConstraint.Create (HeightEditor, NSLayoutAttribute.Width, NSLayoutRelation.Equal, WidthEditor, NSLayoutAttribute.Width, 1f, 0f),
NSLayoutConstraint.Create (HeightEditor, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, 18),

NSLayoutConstraint.Create (HeightLabel, NSLayoutAttribute.Top, NSLayoutRelation.Equal, WidthLabel, NSLayoutAttribute.Top, 1f, 0f),
NSLayoutConstraint.Create (HeightLabel, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, 18),
NSLayoutConstraint.Create (HeightLabel, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, labelHeight),

NSLayoutConstraint.Create (WidthLabel, NSLayoutAttribute.CenterX, NSLayoutRelation.Equal, WidthEditor.Subviews[0], NSLayoutAttribute.CenterX, 1f, 0),
NSLayoutConstraint.Create (HeightLabel, NSLayoutAttribute.CenterX, NSLayoutRelation.Equal, HeightEditor.Subviews[0], NSLayoutAttribute.CenterX, 1f, 0),

NSLayoutConstraint.Create (XLabel, NSLayoutAttribute.Bottom, NSLayoutRelation.Equal, WidthEditor, NSLayoutAttribute.Top, 1f, 0f),
NSLayoutConstraint.Create (XLabel, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, labelHeight),

NSLayoutConstraint.Create (XEditor, NSLayoutAttribute.Bottom, NSLayoutRelation.Equal, XLabel, NSLayoutAttribute.Top, 1f, -1f),
NSLayoutConstraint.Create (XEditor, NSLayoutAttribute.Left, NSLayoutRelation.Equal, WidthEditor, NSLayoutAttribute.Left, 1f, 0f),
NSLayoutConstraint.Create (XEditor, NSLayoutAttribute.Right, NSLayoutRelation.Equal, YEditor, NSLayoutAttribute.Left, 1f, -10f),

NSLayoutConstraint.Create (YLabel, NSLayoutAttribute.Top, NSLayoutRelation.Equal, XLabel, NSLayoutAttribute.Top, 1f, 0f),
NSLayoutConstraint.Create (YLabel, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, labelHeight),

NSLayoutConstraint.Create (YEditor, NSLayoutAttribute.Top, NSLayoutRelation.Equal, XEditor, NSLayoutAttribute.Top, 1f, 0f),
NSLayoutConstraint.Create (YEditor, NSLayoutAttribute.Right, NSLayoutRelation.Equal, HeightEditor, NSLayoutAttribute.Right, 1f, 0),
NSLayoutConstraint.Create (YEditor, NSLayoutAttribute.Width, NSLayoutRelation.Equal, XEditor, NSLayoutAttribute.Width, 1f, 0f),

NSLayoutConstraint.Create (XLabel, NSLayoutAttribute.CenterX, NSLayoutRelation.Equal, XEditor.Subviews[0], NSLayoutAttribute.CenterX, 1f, 0),
NSLayoutConstraint.Create (YLabel, NSLayoutAttribute.CenterX, NSLayoutRelation.Equal, YEditor.Subviews[0], NSLayoutAttribute.CenterX, 1f, 0),
NSLayoutConstraint.Create (WidthLabel, NSLayoutAttribute.CenterX, NSLayoutRelation.Equal, WidthEditor.Subviews[0], NSLayoutAttribute.CenterX, 1f, 0),
NSLayoutConstraint.Create (HeightLabel, NSLayoutAttribute.CenterX, NSLayoutRelation.Equal, HeightEditor.Subviews[0], NSLayoutAttribute.CenterX, 1f, 0),
});

AppearanceChanged ();
Expand All @@ -124,10 +124,10 @@ protected virtual void OnInputUpdated (object sender, EventArgs e)

protected override void SetEnabled ()
{
XEditor.Enabled = ViewModel.Property.CanWrite;
YEditor.Enabled = ViewModel.Property.CanWrite;
WidthEditor.Enabled = ViewModel.Property.CanWrite;
HeightEditor.Enabled = ViewModel.Property.CanWrite;
XEditor.Enabled =
YEditor.Enabled =
WidthEditor.Enabled =
HeightEditor.Enabled = ViewModel.IsInputEnabled;
}

protected override void UpdateAccessibilityValues ()
Expand Down
10 changes: 4 additions & 6 deletions Xamarin.PropertyEditing.Mac/Controls/BooleanEditorControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ namespace Xamarin.PropertyEditing.Mac
internal class BooleanEditorControl
: PropertyEditorControl<PropertyViewModel<bool?>>
{
const string setBezelColorSelector = "setBezelColor:";

public BooleanEditorControl (IHostResourceProvider hostResource)
: base (hostResource)
{
BooleanEditor = new FocusableBooleanButton ();
BooleanEditor = new FocusableBooleanButton () { Tag = 1 };

// update the value on 'enter'
BooleanEditor.Activated += (sender, e) => {
Expand All @@ -29,8 +27,8 @@ public BooleanEditorControl (IHostResourceProvider hostResource)

AddSubview (BooleanEditor);

this.AddConstraints (new[] {
NSLayoutConstraint.Create (BooleanEditor, NSLayoutAttribute.CenterY, NSLayoutRelation.Equal, this, NSLayoutAttribute.CenterY, 1f, 0f),
AddConstraints (new[] {
NSLayoutConstraint.Create (BooleanEditor, NSLayoutAttribute.Bottom, NSLayoutRelation.Equal, this, NSLayoutAttribute.Bottom, 1f, -4f),
NSLayoutConstraint.Create (BooleanEditor, NSLayoutAttribute.Width, NSLayoutRelation.Equal, this, NSLayoutAttribute.Width, 1f, 0f),
});
}
Expand Down Expand Up @@ -60,7 +58,7 @@ protected override void UpdateValue ()

protected override void SetEnabled ()
{
BooleanEditor.Enabled = ViewModel.Property.CanWrite;
BooleanEditor.Enabled = ViewModel.IsInputEnabled;
}

protected override void UpdateAccessibilityValues ()
Expand Down
7 changes: 4 additions & 3 deletions Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public BrushEditorControl (IHostResourceProvider hostResources)
this.popUpButton = new ColorPopUpButton {
ControlSize = NSControlSize.Small,
Font = NSFont.SystemFontOfSize (NSFont.SystemFontSizeForControlSize (NSControlSize.Small)),
Tag = 1,
TranslatesAutoresizingMaskIntoConstraints = false,
};

Expand All @@ -64,7 +65,7 @@ public BrushEditorControl (IHostResourceProvider hostResources)

AddSubview (this.popUpButton);

this.AddConstraints (new[] {
AddConstraints (new[] {
NSLayoutConstraint.Create (this.popUpButton, NSLayoutAttribute.Width, NSLayoutRelation.Equal, this, NSLayoutAttribute.Width, 1f, 0),
NSLayoutConstraint.Create (this.popUpButton, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, 16),
NSLayoutConstraint.Create (this.popUpButton, NSLayoutAttribute.CenterY, NSLayoutRelation.Equal, this, NSLayoutAttribute.CenterY, 1f, 0),
Expand All @@ -84,7 +85,7 @@ public BrushEditorControl (IHostResourceProvider hostResources)

protected override void SetEnabled ()
{
this.popUpButton.Enabled = this.ViewModel?.Property.CanWrite ?? false;
this.popUpButton.Enabled = ViewModel?.IsInputEnabled ?? false;
}

string GetTitle ()
Expand All @@ -109,7 +110,7 @@ string GetTitle ()
protected override void UpdateValue ()
{
this.brushTabViewController.ViewModel = ViewModel;
this.popUpButton.Popover = (ViewModel?.Property.CanWrite ?? false) ? this.popover : null;
this.popUpButton.Popover = (ViewModel?.IsInputEnabled ?? false) ? this.popover : null;

if (ViewModel.Solid != null) {
var title = GetTitle ();
Expand Down
1 change: 1 addition & 0 deletions Xamarin.PropertyEditing.Mac/Controls/CharEditorControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ internal class CharEditorControl
public CharEditorControl (IHostResourceProvider hostResources)
: base (hostResources)
{
Entry.Tag = 1;
}

protected override EntryPropertyEditorDelegate<char> CreateDelegate (PropertyViewModel<char> viewModel)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ public CollectionInlineEditorControl (IHostResourceProvider hostResources)
Title = Properties.Resources.CollectionEditButton,
BezelStyle = NSBezelStyle.Rounded,
AccessibilityEnabled = true,
AccessibilityHelp = Properties.Resources.AccessibilityCollectionHelp
AccessibilityHelp = Properties.Resources.AccessibilityCollectionHelp,
Tag = 1,
};

this.openCollection.Activated += (o, e) => {
Expand Down Expand Up @@ -51,7 +52,7 @@ public CollectionInlineEditorControl (IHostResourceProvider hostResources)
protected override void SetEnabled ()
{
base.SetEnabled ();
this.openCollection.Enabled = ViewModel?.Property.CanWrite ?? false;
this.openCollection.Enabled = ViewModel?.IsInputEnabled ?? false;
}

protected override void UpdateAccessibilityValues ()
Expand Down
12 changes: 9 additions & 3 deletions Xamarin.PropertyEditing.Mac/Controls/CombinablePropertyEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,18 @@ public CombinablePropertyEditor (IHostResourceProvider hostResources)
public override nint GetHeight (EditorViewModel vm)
{
var realVm = (CombinablePropertyViewModel<T>)vm;
return subrowHeight * realVm.Choices.Count + 6;
nint baseHeight = subrowHeight * realVm.Choices.Count + 6;
if (realVm != null && realVm.IsVariant) {
return (baseHeight * 2);
}

return baseHeight;
}

protected override void SetEnabled ()
{
foreach (var item in this.combinableList) {
item.Key.Enabled = ViewModel.Property.CanWrite;
item.Key.Enabled = ViewModel.IsInputEnabled;
}
}

Expand Down Expand Up @@ -66,7 +71,7 @@ protected override void OnViewModelChanged (PropertyViewModel oldModel)

AddSubview (checkbox);

this.AddConstraints (new[] {
AddConstraints (new[] {
NSLayoutConstraint.Create (checkbox, NSLayoutAttribute.Top, NSLayoutRelation.Equal, this, NSLayoutAttribute.Top, 1f, top),
NSLayoutConstraint.Create (checkbox, NSLayoutAttribute.Left, NSLayoutRelation.Equal, this, NSLayoutAttribute.Left, 1f, 0f),
NSLayoutConstraint.Create (checkbox, NSLayoutAttribute.Width, NSLayoutRelation.Equal, this, NSLayoutAttribute.Width, 1f, 0),
Expand All @@ -77,6 +82,7 @@ protected override void OnViewModelChanged (PropertyViewModel oldModel)
}

checkbox.Title = choice.Name;
checkbox.Tag = i == 0 ? 1 : -1;

this.combinableList[checkbox] = choice;
top += subrowHeight;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public BasePopOverControl (IHostResourceProvider hostResources, string title, st

AddSubview (this.viewTitle);

this.AddConstraints (new[] {
AddConstraints (new[] {
NSLayoutConstraint.Create (iconView, NSLayoutAttribute.Top, NSLayoutRelation.Equal, this, NSLayoutAttribute.Top, 1f, 5f),
NSLayoutConstraint.Create (iconView, NSLayoutAttribute.Left, NSLayoutRelation.Equal, this, NSLayoutAttribute.Left, 1f, 5f),
NSLayoutConstraint.Create (iconView, NSLayoutAttribute.Width, NSLayoutRelation.Equal, 1f, DefaultIconButtonSize),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using AppKit;
using Xamarin.PropertyEditing.ViewModels;

namespace Xamarin.PropertyEditing.Mac
Expand All @@ -9,6 +10,8 @@ internal class BasePopOverViewModelControl : BasePopOverControl
{
internal PropertyViewModel ViewModel { get; }

public AutoClosePopOver PopOver { get; internal set; }

public BasePopOverViewModelControl (IHostResourceProvider hostResources, PropertyViewModel viewModel, string title, string imageNamed)
: base (hostResources, title, imageNamed)
{
Expand Down
Loading