From eab74420661dd4d42e6b17d1fafc65009c0b94dd Mon Sep 17 00:00:00 2001 From: Bret Johnson Date: Mon, 15 Aug 2022 13:19:46 -0400 Subject: Use a variable width for the property search filter (#816) * Use a variable width for the property search filter Make VSMac have variable width for the property search area instead of the fixed width of 150. That makes it behave more like Windows, where the width is also variable, allowing more space for the user to type. Also, the left/right/top margins around the search control are tweaked, per design input from Hylke. It also fixes AB#1522517. * Update to use Leading/Trailing instead of Left/Right * Update margins * Remove some of the spacing on right of search control --- Xamarin.PropertyEditing.Mac/PropertyEditorPanel.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Xamarin.PropertyEditing.Mac/PropertyEditorPanel.cs b/Xamarin.PropertyEditing.Mac/PropertyEditorPanel.cs index fc2d975..d292ab3 100644 --- a/Xamarin.PropertyEditing.Mac/PropertyEditorPanel.cs +++ b/Xamarin.PropertyEditing.Mac/PropertyEditorPanel.cs @@ -185,15 +185,15 @@ namespace Xamarin.PropertyEditing.Mac this.AddConstraints (new[] { NSLayoutConstraint.Create (this.header, NSLayoutAttribute.Top, NSLayoutRelation.Equal, this, NSLayoutAttribute.Top, 1, 0), NSLayoutConstraint.Create (this.header, NSLayoutAttribute.Width, NSLayoutRelation.Equal, this, NSLayoutAttribute.Width, 1, 0), - NSLayoutConstraint.Create (this.header, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1, 30), + NSLayoutConstraint.Create (this.header, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1, 32), - NSLayoutConstraint.Create (this.tabStack, NSLayoutAttribute.Left, NSLayoutRelation.Equal, this.header, NSLayoutAttribute.Left, 1, 0), + NSLayoutConstraint.Create (this.tabStack, NSLayoutAttribute.Leading, NSLayoutRelation.Equal, this.header, NSLayoutAttribute.Leading, 1, 0), NSLayoutConstraint.Create (this.tabStack, NSLayoutAttribute.Top, NSLayoutRelation.Equal, this.header, NSLayoutAttribute.Top, 1, 0), NSLayoutConstraint.Create (this.tabStack, NSLayoutAttribute.Bottom, NSLayoutRelation.Equal, this.header, NSLayoutAttribute.Bottom, 1, 0), - NSLayoutConstraint.Create (this.tabStack, NSLayoutAttribute.Right, NSLayoutRelation.LessThanOrEqual, this.propertyFilter, NSLayoutAttribute.Left, 1, 0), + NSLayoutConstraint.Create (this.tabStack, NSLayoutAttribute.Trailing, NSLayoutRelation.LessThanOrEqual, this.propertyFilter, NSLayoutAttribute.Leading, 1, 0), - NSLayoutConstraint.Create (this.propertyFilter, NSLayoutAttribute.Right, NSLayoutRelation.Equal, this.header, NSLayoutAttribute.Right, 1, -19), - NSLayoutConstraint.Create (this.propertyFilter, NSLayoutAttribute.Width, NSLayoutRelation.Equal, 1, 150), + NSLayoutConstraint.Create (this.propertyFilter, NSLayoutAttribute.Leading, NSLayoutRelation.Equal, this.tabStack, NSLayoutAttribute.Trailing, 1, 10), + NSLayoutConstraint.Create (this.propertyFilter, NSLayoutAttribute.Trailing, NSLayoutRelation.Equal, this.header, NSLayoutAttribute.Trailing, 1, -6), NSLayoutConstraint.Create (this.propertyFilter, NSLayoutAttribute.CenterY, NSLayoutRelation.Equal, this.header, NSLayoutAttribute.CenterY, 1, 0), NSLayoutConstraint.Create (this.border, NSLayoutAttribute.Bottom, NSLayoutRelation.Equal, this.header, NSLayoutAttribute.Bottom, 1, 0), -- cgit v1.2.3