From e3def59bc58a73fc9f2a724b5e5ed28a64b6b9eb Mon Sep 17 00:00:00 2001 From: Dominique Louis Date: Fri, 16 Nov 2018 15:33:30 +0000 Subject: [Mac] Fix Alignments so they are uniform across controls. --- .../Controls/BasePointEditorControl.cs | 1 + .../Controls/BooleanEditorControl.cs | 5 +- .../Controls/BrushEditorControl.cs | 33 ++++++------- .../Controls/EditorContainer.cs | 2 +- .../Controls/NumericEditorControl.cs | 4 +- .../Controls/PanelHeaderEditorControl.cs | 6 +-- .../Controls/PointEditorControl.cs | 6 +-- .../Controls/PredefinedValuesEditor.cs | 54 +++++++++++----------- .../Controls/RatioEditorControl.cs | 26 +++++------ .../Controls/RectangleEditorControl.cs | 12 ++--- .../Controls/SizeEditorControl.cs | 6 +-- .../Controls/StringEditorControl.cs | 2 +- .../Controls/ThicknessEditorControl.cs | 12 ++--- 13 files changed, 85 insertions(+), 84 deletions(-) (limited to 'Xamarin.PropertyEditing.Mac/Controls') diff --git a/Xamarin.PropertyEditing.Mac/Controls/BasePointEditorControl.cs b/Xamarin.PropertyEditing.Mac/Controls/BasePointEditorControl.cs index 287a92f..69cbb5f 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/BasePointEditorControl.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/BasePointEditorControl.cs @@ -43,6 +43,7 @@ namespace Xamarin.PropertyEditing.Mac 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), diff --git a/Xamarin.PropertyEditing.Mac/Controls/BooleanEditorControl.cs b/Xamarin.PropertyEditing.Mac/Controls/BooleanEditorControl.cs index 836b672..a7d541f 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/BooleanEditorControl.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/BooleanEditorControl.cs @@ -36,9 +36,8 @@ namespace Xamarin.PropertyEditing.Mac AddSubview (BooleanEditor); this.DoConstraints (new[] { - BooleanEditor.ConstraintTo (this, (cb, c) => cb.Width == c.Width - 50), - BooleanEditor.ConstraintTo (this, (cb, c) => cb.Top == c.Top + 5), - BooleanEditor.ConstraintTo (this, (cb, c) => cb.Left == c.Left + 4), + BooleanEditor.ConstraintTo (this, (be, c) => be.Width == c.Width - 50), + BooleanEditor.ConstraintTo (this, (be, c) => be.Top == c.Top + 6), }); UpdateTheme (); diff --git a/Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs b/Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs index ed00525..b565679 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs @@ -41,10 +41,11 @@ namespace Xamarin.PropertyEditing.Mac { TranslatesAutoresizingMaskIntoConstraints = false; - this.popover = new NSPopover (); - popover.Behavior = NSPopoverBehavior.Transient; - popover.ContentViewController = brushTabViewController = new BrushTabViewController { - PreferredContentSize = new CGSize (430, 263) + this.popover = new NSPopover { + Behavior = NSPopoverBehavior.Transient, + ContentViewController = this.brushTabViewController = new BrushTabViewController { + PreferredContentSize = new CGSize (430, 263) + } }; this.popUpButton = new ColorPopUpButton { @@ -53,14 +54,14 @@ namespace Xamarin.PropertyEditing.Mac Font = NSFont.FromFontName (DefaultFontName, DefaultFontSize), }; - popupButtonList = new NSMenu (); - popUpButton.Menu = popupButtonList; + this.popupButtonList = new NSMenu (); + this.popUpButton.Menu = this.popupButtonList; this.DoConstraints (new [] { - popUpButton.ConstraintTo (this, (pub, c) => pub.Width == c.Width - 34), - popUpButton.ConstraintTo (this, (pub, c) => pub.Height == DefaultControlHeight + 1), - popUpButton.ConstraintTo (this, (pub, c) => pub.Left == c.Left + 4), - popUpButton.ConstraintTo (this, (pub, c) => pub.Top == c.Top + 0), + this.popUpButton.ConstraintTo (this, (pub, c) => pub.Width == c.Width - 33), + this.popUpButton.ConstraintTo (this, (pub, c) => pub.Height == DefaultControlHeight + 1), + this.popUpButton.ConstraintTo (this, (pub, c) => pub.Top == c.Top + 0), + this.popUpButton.ConstraintTo (this, (pub, c) => pub.Left == c.Left - 1), }); AddSubview (this.popUpButton); @@ -119,19 +120,19 @@ namespace Xamarin.PropertyEditing.Mac protected override void UpdateValue () { this.brushTabViewController.ViewModel = ViewModel; - this.popUpButton.Popover = (ViewModel?.Property.CanWrite ?? false) ? popover : null; + this.popUpButton.Popover = (ViewModel?.Property.CanWrite ?? false) ? this.popover : null; if (ViewModel.Solid != null) { var title = GetTitle (); - if (popupButtonList.Count == 0) - popupButtonList.AddItem (new NSMenuItem ()); + if (this.popupButtonList.Count == 0) + this.popupButtonList.AddItem (new NSMenuItem ()); - previewLayer.Brush = ViewModel.Value; - var item = popupButtonList.ItemAt (0); + this.previewLayer.Brush = ViewModel.Value; + var item = this.popupButtonList.ItemAt (0); if (item.Title != title) { item.Title = title; - item.Image = previewLayer.RenderPreview (); + item.Image = this.previewLayer.RenderPreview (); } } } diff --git a/Xamarin.PropertyEditing.Mac/Controls/EditorContainer.cs b/Xamarin.PropertyEditing.Mac/Controls/EditorContainer.cs index 8e1ea84..4795fbe 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/EditorContainer.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/EditorContainer.cs @@ -12,7 +12,7 @@ namespace Xamarin.PropertyEditing.Mac AddSubview (this.label); this.AddConstraints (new[] { - NSLayoutConstraint.Create (this.label, NSLayoutAttribute.CenterY, NSLayoutRelation.Equal, this, NSLayoutAttribute.CenterY, 1f, 0f), + NSLayoutConstraint.Create (this.label, NSLayoutAttribute.Top, NSLayoutRelation.Equal, this, NSLayoutAttribute.Top, 1f, 4f), NSLayoutConstraint.Create (this.label, NSLayoutAttribute.Right, NSLayoutRelation.Equal, this, NSLayoutAttribute.Right, Mac.Layout.GoldenRatioLeft, 0f), NSLayoutConstraint.Create (this.label, NSLayoutAttribute.Left, NSLayoutRelation.Equal, this, NSLayoutAttribute.Left, 1f, 0f), }); diff --git a/Xamarin.PropertyEditing.Mac/Controls/NumericEditorControl.cs b/Xamarin.PropertyEditing.Mac/Controls/NumericEditorControl.cs index b0ab2b9..27206d5 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/NumericEditorControl.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/NumericEditorControl.cs @@ -40,8 +40,8 @@ namespace Xamarin.PropertyEditing.Mac this.DoConstraints ( new[] { NumericEditor.ConstraintTo (this, (n, c) => n.Top == c.Top + 1), - NumericEditor.ConstraintTo (this, (n, c) => n.Left == c.Left + 4), - NumericEditor.ConstraintTo (this, (n, c) => n.Width == c.Width - 33), + NumericEditor.ConstraintTo (this, (n, c) => n.Width == c.Width - 32), + NumericEditor.ConstraintTo (this, (n, c) => n.Left == c.Left - 1), }); } diff --git a/Xamarin.PropertyEditing.Mac/Controls/PanelHeaderEditorControl.cs b/Xamarin.PropertyEditing.Mac/Controls/PanelHeaderEditorControl.cs index 9da3a05..c183b6e 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/PanelHeaderEditorControl.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/PanelHeaderEditorControl.cs @@ -63,15 +63,15 @@ namespace Xamarin.PropertyEditing.Mac NSLayoutConstraint.Create (this.objectNameLabel, NSLayoutAttribute.Right, NSLayoutRelation.Equal, this, NSLayoutAttribute.Right, Mac.Layout.GoldenRatioLeft, 0f), NSLayoutConstraint.Create (this.propertyObjectName, NSLayoutAttribute.CenterY, NSLayoutRelation.Equal, this.objectNameLabel, NSLayoutAttribute.CenterY, 1, 0), - NSLayoutConstraint.Create (this.propertyObjectName, NSLayoutAttribute.Left, NSLayoutRelation.Equal, this.objectNameLabel, NSLayoutAttribute.Right, 1, 5), - NSLayoutConstraint.Create (this.propertyObjectName, NSLayoutAttribute.Right, NSLayoutRelation.Equal, this, NSLayoutAttribute.Right, 1, -(14 + PropertyButton.DefaultSize)), + NSLayoutConstraint.Create (this.propertyObjectName, NSLayoutAttribute.Left, NSLayoutRelation.Equal, this.objectNameLabel, NSLayoutAttribute.Right, 1, 4.5f), + NSLayoutConstraint.Create (this.propertyObjectName, NSLayoutAttribute.Right, NSLayoutRelation.Equal, this, NSLayoutAttribute.Right, 1, -(14.5f + PropertyButton.DefaultSize)), NSLayoutConstraint.Create (this.typeLabel, NSLayoutAttribute.Top, NSLayoutRelation.Equal, this.propertyObjectName, NSLayoutAttribute.Bottom, 1, 5), NSLayoutConstraint.Create (this.typeLabel, NSLayoutAttribute.Right, NSLayoutRelation.Equal, this, NSLayoutAttribute.Right, Mac.Layout.GoldenRatioLeft, 0f), NSLayoutConstraint.Create (this.typeDisplay, NSLayoutAttribute.Top, NSLayoutRelation.Equal, this.typeLabel, NSLayoutAttribute.Top, 1, 0), NSLayoutConstraint.Create (this.typeDisplay, NSLayoutAttribute.Width, NSLayoutRelation.Equal, this.propertyObjectName, NSLayoutAttribute.Width, 1, 0), - NSLayoutConstraint.Create (this.typeDisplay, NSLayoutAttribute.Left, NSLayoutRelation.Equal, this.typeLabel, NSLayoutAttribute.Right, 1, 5) + NSLayoutConstraint.Create (this.typeDisplay, NSLayoutAttribute.Left, NSLayoutRelation.Equal, this.typeLabel, NSLayoutAttribute.Right, 1, 4) }); } diff --git a/Xamarin.PropertyEditing.Mac/Controls/PointEditorControl.cs b/Xamarin.PropertyEditing.Mac/Controls/PointEditorControl.cs index 963eb08..d087545 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/PointEditorControl.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/PointEditorControl.cs @@ -12,13 +12,13 @@ namespace Xamarin.PropertyEditing.Mac { public PointEditorControl () { - XLabel.Frame = new CGRect (38, -6, 25, 22); + XLabel.Frame = new CGRect (34, -10, 25, 22); XLabel.Font = NSFont.FromFontName (DefaultFontName, DefaultDescriptionLabelFontSize); // TODO: Washed-out color following specs XLabel.StringValue = "X"; // TODO Localise - XEditor.Frame = new CGRect (4, 13, 90, 20); + XEditor.Frame = new CGRect (0, 13, 90, 20); - YLabel.Frame = new CGRect (166, -6, 25, 22); + YLabel.Frame = new CGRect (166, -10, 25, 22); YLabel.Font = NSFont.FromFontName (DefaultFontName, DefaultDescriptionLabelFontSize); // TODO: Washed-out color following specs YLabel.StringValue = "Y"; // TODO Localise diff --git a/Xamarin.PropertyEditing.Mac/Controls/PredefinedValuesEditor.cs b/Xamarin.PropertyEditing.Mac/Controls/PredefinedValuesEditor.cs index 70815c4..5c3b667 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/PredefinedValuesEditor.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/PredefinedValuesEditor.cs @@ -39,25 +39,25 @@ namespace Xamarin.PropertyEditing.Mac }; popupButtonList = new NSMenu (); - popUpButton.Menu = popupButtonList; + this.popUpButton.Menu = popupButtonList; - popUpButton.Activated += (o, e) => { + this.popUpButton.Activated += (o, e) => { ViewModel.ValueName = (o as NSPopUpButton).Title; }; UpdateTheme (); } - public override NSView FirstKeyView => firstKeyView; - public override NSView LastKeyView => lastKeyView; + public override NSView FirstKeyView => this.firstKeyView; + public override NSView LastKeyView => this.lastKeyView; - readonly NSComboBox comboBox; - readonly NSPopUpButton popUpButton; - NSMenu popupButtonList; + private readonly NSComboBox comboBox; + private readonly NSPopUpButton popUpButton; + private NSMenu popupButtonList; - bool dataPopulated; - NSView firstKeyView; - NSView lastKeyView; + private bool dataPopulated; + private NSView firstKeyView; + private NSView lastKeyView; protected override void HandleErrorsChanged (object sender, DataErrorsChangedEventArgs e) { @@ -85,24 +85,24 @@ namespace Xamarin.PropertyEditing.Mac protected override void OnViewModelChanged (PropertyViewModel oldModel) { - if (!dataPopulated) { + if (!this.dataPopulated) { if (ViewModel.IsConstrainedToPredefined) { this.popupButtonList.RemoveAllItems (); foreach (string item in ViewModel.PossibleValues) { - popupButtonList.AddItem (new NSMenuItem (item)); + this.popupButtonList.AddItem (new NSMenuItem (item)); } AddSubview (this.popUpButton); this.DoConstraints (new[] { - popUpButton.ConstraintTo (this, (pub, c) => pub.Width == c.Width - 34), - popUpButton.ConstraintTo (this, (pub, c) => pub.Height == DefaultControlHeight + 1), - popUpButton.ConstraintTo (this, (pub, c) => pub.Left == pub.Left + 4), - popUpButton.ConstraintTo (this, (pub, c) => pub.Top == pub.Top + 0), + this.popUpButton.ConstraintTo (this, (pub, c) => pub.Width == c.Width - 34), + this.popUpButton.ConstraintTo (this, (pub, c) => pub.Height == DefaultControlHeight + 1), + this.popUpButton.ConstraintTo (this, (pub, c) => pub.Top == pub.Top + 0), + this.popUpButton.ConstraintTo (this, (pub, c) => pub.Left == pub.Left + 1), }); - firstKeyView = this.popUpButton; - lastKeyView = this.popUpButton; + this.firstKeyView = this.popUpButton; + this.lastKeyView = this.popUpButton; } else { this.comboBox.RemoveAll (); @@ -114,17 +114,17 @@ namespace Xamarin.PropertyEditing.Mac AddSubview (this.comboBox); this.DoConstraints (new[] { - comboBox.ConstraintTo (this, (cb, c) => cb.Width == c.Width - 35), - comboBox.ConstraintTo (this, (cb, c) => cb.Height == DefaultControlHeight), - comboBox.ConstraintTo (this, (cb, c) => cb.Left == cb.Left + 4), - comboBox.ConstraintTo (this, (cb, c) => cb.Top == cb.Top + 0), + this.comboBox.ConstraintTo (this, (cb, c) => cb.Width == c.Width - 34), + this.comboBox.ConstraintTo (this, (cb, c) => cb.Height == DefaultControlHeight), + this.comboBox.ConstraintTo (this, (cb, c) => cb.Top == cb.Top + 0), + this.comboBox.ConstraintTo (this, (cb, c) => cb.Left == cb.Left - 1), }); - firstKeyView = this.comboBox; - lastKeyView = this.comboBox; + this.firstKeyView = this.comboBox; + this.lastKeyView = this.comboBox; } - dataPopulated = true; + this.dataPopulated = true; } base.OnViewModelChanged (oldModel); @@ -142,8 +142,8 @@ namespace Xamarin.PropertyEditing.Mac protected override void UpdateAccessibilityValues () { if (ViewModel.IsConstrainedToPredefined) { - popUpButton.AccessibilityEnabled = popUpButton.Enabled; - popUpButton.AccessibilityTitle = string.Format (LocalizationResources.AccessibilityCombobox, ViewModel.Property.Name); + this.popUpButton.AccessibilityEnabled = this.popUpButton.Enabled; + this.popUpButton.AccessibilityTitle = string.Format (LocalizationResources.AccessibilityCombobox, ViewModel.Property.Name); } else { comboBox.AccessibilityEnabled = comboBox.Enabled; comboBox.AccessibilityTitle = string.Format (LocalizationResources.AccessibilityCombobox, ViewModel.Property.Name); diff --git a/Xamarin.PropertyEditing.Mac/Controls/RatioEditorControl.cs b/Xamarin.PropertyEditing.Mac/Controls/RatioEditorControl.cs index a859652..8a724a7 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/RatioEditorControl.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/RatioEditorControl.cs @@ -9,13 +9,13 @@ namespace Xamarin.PropertyEditing.Mac { internal class RatioEditorControl : PropertyEditorControl { - RatioEditor ratioEditor; + private RatioEditor ratioEditor; public RatioEditorControl () { base.TranslatesAutoresizingMaskIntoConstraints = false; - ratioEditor = new RatioEditor { + this.ratioEditor = new RatioEditor { AllowNegativeValues = false, AllowRatios = true, BackgroundColor = NSColor.Clear, @@ -24,18 +24,18 @@ namespace Xamarin.PropertyEditing.Mac }; // update the value on keypress - ratioEditor.ValueChanged += (sender, e) => { + this.ratioEditor.ValueChanged += (sender, e) => { if (e is RatioEditor.RatioEventArgs ratioEventArgs) { - ViewModel.ValueChanged (ratioEditor.StringValue, ratioEventArgs.CaretPosition, ratioEventArgs.SelectionLength, ratioEventArgs.IncrementValue); + ViewModel.ValueChanged (this.ratioEditor.StringValue, ratioEventArgs.CaretPosition, ratioEventArgs.SelectionLength, ratioEventArgs.IncrementValue); } }; - AddSubview (ratioEditor); + AddSubview (this.ratioEditor); this.DoConstraints (new[] { - ratioEditor.ConstraintTo (this, (re, c) => re.Top == c.Top - 2), - ratioEditor.ConstraintTo (this, (re, c) => re.Left == c.Left + 4), - ratioEditor.ConstraintTo (this, (re, c) => re.Width == c.Width - 33), - ratioEditor.ConstraintTo (this, (re, c) => re.Height == DefaultControlHeight), + this.ratioEditor.ConstraintTo (this, (re, c) => re.Top == c.Top - 2), + this.ratioEditor.ConstraintTo (this, (re, c) => re.Left == c.Left - 1), + this.ratioEditor.ConstraintTo (this, (re, c) => re.Width == c.Width - 32), + this.ratioEditor.ConstraintTo (this, (re, c) => re.Height == DefaultControlHeight), }); UpdateTheme (); @@ -51,13 +51,13 @@ namespace Xamarin.PropertyEditing.Mac protected override void SetEnabled () { - ratioEditor.Editable = ViewModel.Property.CanWrite; + this.ratioEditor.Editable = ViewModel.Property.CanWrite; } protected override void UpdateAccessibilityValues () { - ratioEditor.AccessibilityEnabled = ratioEditor.Enabled; - ratioEditor.AccessibilityTitle = string.Format (LocalizationResources.AccessibilityNumeric, ViewModel.Property.Name); + this.ratioEditor.AccessibilityEnabled = this.ratioEditor.Enabled; + this.ratioEditor.AccessibilityTitle = string.Format (LocalizationResources.AccessibilityNumeric, ViewModel.Property.Name); } protected override void UpdateErrorsDisplayed (IEnumerable errors) @@ -72,7 +72,7 @@ namespace Xamarin.PropertyEditing.Mac protected override void UpdateValue () { - ratioEditor.StringValue = ViewModel.ValueString; + this.ratioEditor.StringValue = ViewModel.ValueString; } } } diff --git a/Xamarin.PropertyEditing.Mac/Controls/RectangleEditorControl.cs b/Xamarin.PropertyEditing.Mac/Controls/RectangleEditorControl.cs index efcefbc..e91a76d 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/RectangleEditorControl.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/RectangleEditorControl.cs @@ -12,25 +12,25 @@ namespace Xamarin.PropertyEditing.Mac public RectangleEditorControl () { // TODO localize - XLabel.Frame = new CGRect (38, 27, 25, 22); + XLabel.Frame = new CGRect (34, 23, 25, 22); XLabel.Font = NSFont.FromFontName (DefaultFontName, DefaultDescriptionLabelFontSize); // TODO: Washed-out color following specs XLabel.StringValue = "X"; - XEditor.Frame = new CGRect (4, 46, 90, 20); + XEditor.Frame = new CGRect (-1, 46, 90, 20); - YLabel.Frame = new CGRect (166, 27, 25, 22); + YLabel.Frame = new CGRect (166, 23, 25, 22); YLabel.Font = NSFont.FromFontName (DefaultFontName, DefaultDescriptionLabelFontSize); // TODO: Washed-out color following specs YLabel.StringValue = "Y"; YEditor.Frame = new CGRect (132, 46, 90, 20); - WidthLabel.Frame = new CGRect (24, -6, 50, 22); + WidthLabel.Frame = new CGRect (20, -10, 50, 22); WidthLabel.Font = NSFont.FromFontName (DefaultFontName, DefaultDescriptionLabelFontSize); // TODO: Washed-out color following specs WidthLabel.StringValue = "WIDTH"; - WidthEditor.Frame = new CGRect (4, 13, 90, 20); + WidthEditor.Frame = new CGRect (-1, 13, 90, 20); - HeightLabel.Frame = new CGRect (150, -6, 50, 22); + HeightLabel.Frame = new CGRect (150, -10, 50, 22); HeightLabel.Font = NSFont.FromFontName (DefaultFontName, DefaultDescriptionLabelFontSize); // TODO: Washed-out color following specs HeightLabel.StringValue = "HEIGHT"; diff --git a/Xamarin.PropertyEditing.Mac/Controls/SizeEditorControl.cs b/Xamarin.PropertyEditing.Mac/Controls/SizeEditorControl.cs index 0152f05..56700f5 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/SizeEditorControl.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/SizeEditorControl.cs @@ -13,13 +13,13 @@ namespace Xamarin.PropertyEditing.Mac { public SizeEditorControl () { - XLabel.Frame = new CGRect (24, -6, 50, 22); + XLabel.Frame = new CGRect (20, -10, 50, 22); XLabel.Font = NSFont.FromFontName (DefaultFontName, DefaultDescriptionLabelFontSize); // TODO: Washed-out color following specs XLabel.StringValue = "WIDTH"; // TODO Localise - XEditor.Frame = new CGRect (4, 13, 90, 20); + XEditor.Frame = new CGRect (0, 13, 90, 20); - YLabel.Frame = new CGRect (150, -6, 50, 22); + YLabel.Frame = new CGRect (150, -10, 50, 22); YLabel.Font = NSFont.FromFontName (DefaultFontName, DefaultDescriptionLabelFontSize); // TODO: Washed-out color following specs YLabel.StringValue = "HEIGHT"; // TODO Localise diff --git a/Xamarin.PropertyEditing.Mac/Controls/StringEditorControl.cs b/Xamarin.PropertyEditing.Mac/Controls/StringEditorControl.cs index 4fa8fef..dd7564e 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/StringEditorControl.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/StringEditorControl.cs @@ -29,8 +29,8 @@ namespace Xamarin.PropertyEditing.Mac this.DoConstraints (new[] { StringEditor.ConstraintTo (this, (s, c) => s.Width == c.Width - 34), StringEditor.ConstraintTo (this, (s, c) => s.Height == DefaultControlHeight - 3), - StringEditor.ConstraintTo (this, (s, c) => s.Left == s.Left + 4), StringEditor.ConstraintTo (this, (s, c) => s.Top == s.Top + 1), + StringEditor.ConstraintTo (this, (s, c) => s.Left == s.Left - 1), }); UpdateTheme (); diff --git a/Xamarin.PropertyEditing.Mac/Controls/ThicknessEditorControl.cs b/Xamarin.PropertyEditing.Mac/Controls/ThicknessEditorControl.cs index dea4aa0..5c196b5 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/ThicknessEditorControl.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/ThicknessEditorControl.cs @@ -11,25 +11,25 @@ namespace Xamarin.PropertyEditing.Mac { public CommonThicknessEditorControl () { - XLabel.Frame = new CGRect (28, 27, 50, 22); + XLabel.Frame = new CGRect (28, 23, 50, 22); XLabel.Font = NSFont.FromFontName (DefaultFontName, DefaultDescriptionLabelFontSize); XLabel.StringValue = "LEFT"; - XEditor.Frame = new CGRect (4, 46, 90, 20); + XEditor.Frame = new CGRect (-1, 46, 90, 20); - YLabel.Frame = new CGRect (160, 27, 45, 22); + YLabel.Frame = new CGRect (160, 23, 45, 22); YLabel.Font = NSFont.FromFontName (DefaultFontName, DefaultDescriptionLabelFontSize); YLabel.StringValue = "TOP"; YEditor.Frame = new CGRect (132, 46, 90, 20); - WidthLabel.Frame = new CGRect (24, -6, 50, 22); + WidthLabel.Frame = new CGRect (24, -10, 50, 22); WidthLabel.Font = NSFont.FromFontName (DefaultFontName, DefaultDescriptionLabelFontSize); WidthLabel.StringValue = "RIGHT"; - WidthEditor.Frame = new CGRect (4, 13, 90, 20); + WidthEditor.Frame = new CGRect (-1, 13, 90, 20); - HeightLabel.Frame = new CGRect (150, -6, 50, 22); + HeightLabel.Frame = new CGRect (150, -10, 50, 22); HeightLabel.Font = NSFont.FromFontName (DefaultFontName, DefaultDescriptionLabelFontSize); HeightLabel.StringValue = "BOTTOM"; -- cgit v1.2.3