From 794123986062cb0a8ab2885bbb449bb62f9f13ad Mon Sep 17 00:00:00 2001 From: Dominique Louis Date: Wed, 28 Nov 2018 18:26:03 +0000 Subject: [Mac] Fix vertical alignment of labels in resource lists. --- .../Controls/BasePointEditorControl.cs | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'Xamarin.PropertyEditing.Mac/Controls/BasePointEditorControl.cs') diff --git a/Xamarin.PropertyEditing.Mac/Controls/BasePointEditorControl.cs b/Xamarin.PropertyEditing.Mac/Controls/BasePointEditorControl.cs index 69cbb5f..dd32a50 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/BasePointEditorControl.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/BasePointEditorControl.cs @@ -17,33 +17,30 @@ namespace Xamarin.PropertyEditing.Mac public override NSView FirstKeyView => XEditor; public override NSView LastKeyView => YEditor.DecrementButton; - public BasePointEditorControl () + protected BasePointEditorControl () { XLabel = new UnfocusableTextField (); - XEditor = new NumericSpinEditor (); - XEditor.BackgroundColor = NSColor.Clear; - XEditor.Value = 0.0f; + XEditor = new NumericSpinEditor { + BackgroundColor = NSColor.Clear, + Value = 0.0f + }; XEditor.ValueChanged += OnInputUpdated; - XLabel.AccessibilityElement = false; - YLabel = new UnfocusableTextField (); - YEditor = new NumericSpinEditor (); - YEditor.BackgroundColor = NSColor.Clear; - YEditor.Value = 0.0f; + YEditor = new NumericSpinEditor { + BackgroundColor = NSColor.Clear, + Value = 0.0f + }; YEditor.ValueChanged += OnInputUpdated; - YLabel.AccessibilityElement = false; - AddSubview (XLabel); AddSubview (XEditor); AddSubview (YLabel); AddSubview (YEditor); this.DoConstraints (new[] { - XEditor.ConstraintTo (this, (xe, c) => xe.Left == xe.Left - 1), XEditor.ConstraintTo (this, (xe, c) => xe.Width == 90), XEditor.ConstraintTo (this, (xe, c) => xe.Height == DefaultControlHeight), YEditor.ConstraintTo (this, (ye, c) => ye.Width == 90), -- cgit v1.2.3