diff options
author | Eric Maupin <ermaup@microsoft.com> | 2019-03-01 21:41:25 +0300 |
---|---|---|
committer | Eric Maupin <ermaup@microsoft.com> | 2019-03-06 21:49:07 +0300 |
commit | 209bd74f25407d7c43533cfd2b2b9b2e237ff3e7 (patch) | |
tree | 4c3598eafd3123243847faa1443feb7cdbb66ad6 /Xamarin.PropertyEditing.Mac | |
parent | 5ed8c35ad486e3d15b05178f68c63b129b0bf690 (diff) |
[mac] Drop margins from some color layers for more consistency
Diffstat (limited to 'Xamarin.PropertyEditing.Mac')
3 files changed, 5 insertions, 9 deletions
diff --git a/Xamarin.PropertyEditing.Mac/Controls/Custom/HistoryLayer.cs b/Xamarin.PropertyEditing.Mac/Controls/Custom/HistoryLayer.cs index 221f076..e56786b 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/Custom/HistoryLayer.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/Custom/HistoryLayer.cs @@ -7,7 +7,6 @@ namespace Xamarin.PropertyEditing.Mac { internal class HistoryLayer : ColorEditorLayer { - private const float Margin = 3; private const float BorderRadius = 3; public HistoryLayer (IHostResourceProvider hostResources) @@ -54,13 +53,13 @@ namespace Xamarin.PropertyEditing.Mac Bounds.Right - Bounds.Height, 0, Bounds.Height, - Bounds.Height).Inset (Margin, Margin); + Bounds.Height); this.clip.Frame = new CGRect ( 0, 0, - Bounds.Width - Bounds.Height + Margin, - Bounds.Height).Inset (Margin, Margin); + Bounds.Width - Bounds.Height - 3, + Bounds.Height); NSColor cc0 = this.hostResources.GetNamedColor (NamedResources.Checkerboard0Color); NSColor cc1 = this.hostResources.GetNamedColor (NamedResources.Checkerboard1Color); diff --git a/Xamarin.PropertyEditing.Mac/Controls/Custom/HueLayer.cs b/Xamarin.PropertyEditing.Mac/Controls/Custom/HueLayer.cs index 420e9ca..c67b138 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/Custom/HueLayer.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/Custom/HueLayer.cs @@ -86,7 +86,7 @@ namespace Xamarin.PropertyEditing.Mac public override void LayoutSublayers () { base.LayoutSublayers (); - this.colors.Frame = Bounds.Inset (2, 2); + this.colors.Frame = Bounds; this.grip.Frame = new CGRect ( this.grip.Frame.X, this.grip.Frame.Y, diff --git a/Xamarin.PropertyEditing.Mac/Controls/Custom/ShadeLayer.cs b/Xamarin.PropertyEditing.Mac/Controls/Custom/ShadeLayer.cs index 7a83418..045116e 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/Custom/ShadeLayer.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/Custom/ShadeLayer.cs @@ -1,9 +1,7 @@ using System; -using System.Linq; using AppKit; using CoreAnimation; using CoreGraphics; -using Xamarin.PropertyEditing.Drawing; namespace Xamarin.PropertyEditing.Mac { @@ -11,7 +9,6 @@ namespace Xamarin.PropertyEditing.Mac { private const float GripRadius = 4; private const float BorderRadius = 3; - private const float Margin = 3; private readonly ChannelEditor saturationEditor = new HsbSaturationChannelEditor (); private readonly ChannelEditor brightnessEditor = new HsbBrightnessChannelEditor (); @@ -68,7 +65,7 @@ namespace Xamarin.PropertyEditing.Mac { base.LayoutSublayers (); - this.saturationLayer.Frame = Bounds.Inset (Margin, Margin); + this.saturationLayer.Frame = Bounds; this.brightnessLayer.Frame = this.saturationLayer.Bounds; this.saturationLayer.StartPoint = new CGPoint (0, .5); this.saturationLayer.EndPoint = new CGPoint (1, .5); |