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

Commit 209bd74

Browse files
author
Eric Maupin
committed
[mac] Drop margins from some color layers for more consistency
1 parent 5ed8c35 commit 209bd74

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

Xamarin.PropertyEditing.Mac/Controls/Custom/HistoryLayer.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ namespace Xamarin.PropertyEditing.Mac
77
{
88
internal class HistoryLayer : ColorEditorLayer
99
{
10-
private const float Margin = 3;
1110
private const float BorderRadius = 3;
1211

1312
public HistoryLayer (IHostResourceProvider hostResources)
@@ -54,13 +53,13 @@ public override void LayoutSublayers ()
5453
Bounds.Right - Bounds.Height,
5554
0,
5655
Bounds.Height,
57-
Bounds.Height).Inset (Margin, Margin);
56+
Bounds.Height);
5857

5958
this.clip.Frame = new CGRect (
6059
0,
6160
0,
62-
Bounds.Width - Bounds.Height + Margin,
63-
Bounds.Height).Inset (Margin, Margin);
61+
Bounds.Width - Bounds.Height - 3,
62+
Bounds.Height);
6463

6564
NSColor cc0 = this.hostResources.GetNamedColor (NamedResources.Checkerboard0Color);
6665
NSColor cc1 = this.hostResources.GetNamedColor (NamedResources.Checkerboard1Color);

Xamarin.PropertyEditing.Mac/Controls/Custom/HueLayer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public override void Commit (EditorInteraction interaction)
8686
public override void LayoutSublayers ()
8787
{
8888
base.LayoutSublayers ();
89-
this.colors.Frame = Bounds.Inset (2, 2);
89+
this.colors.Frame = Bounds;
9090
this.grip.Frame = new CGRect (
9191
this.grip.Frame.X,
9292
this.grip.Frame.Y,

Xamarin.PropertyEditing.Mac/Controls/Custom/ShadeLayer.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
using System;
2-
using System.Linq;
32
using AppKit;
43
using CoreAnimation;
54
using CoreGraphics;
6-
using Xamarin.PropertyEditing.Drawing;
75

86
namespace Xamarin.PropertyEditing.Mac
97
{
108
class ShadeLayer : ColorEditorLayer
119
{
1210
private const float GripRadius = 4;
1311
private const float BorderRadius = 3;
14-
private const float Margin = 3;
1512
private readonly ChannelEditor saturationEditor = new HsbSaturationChannelEditor ();
1613
private readonly ChannelEditor brightnessEditor = new HsbBrightnessChannelEditor ();
1714

@@ -68,7 +65,7 @@ public override void LayoutSublayers ()
6865
{
6966
base.LayoutSublayers ();
7067

71-
this.saturationLayer.Frame = Bounds.Inset (Margin, Margin);
68+
this.saturationLayer.Frame = Bounds;
7269
this.brightnessLayer.Frame = this.saturationLayer.Bounds;
7370
this.saturationLayer.StartPoint = new CGPoint (0, .5);
7471
this.saturationLayer.EndPoint = new CGPoint (1, .5);

0 commit comments

Comments
 (0)