From d483b8506f858f3927ec39225cbe63a7de158ff8 Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Fri, 18 May 2018 13:40:17 -0500 Subject: Make initialization a little more consistent --- .../Controls/Custom/ColorComponentEditor.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'Xamarin.PropertyEditing.Mac/Controls/Custom/ColorComponentEditor.cs') diff --git a/Xamarin.PropertyEditing.Mac/Controls/Custom/ColorComponentEditor.cs b/Xamarin.PropertyEditing.Mac/Controls/Custom/ColorComponentEditor.cs index 25a3516..0a17a23 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/Custom/ColorComponentEditor.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/Custom/ColorComponentEditor.cs @@ -48,9 +48,13 @@ namespace Xamarin.PropertyEditing.Mac var ce = new ChannelGroup { Label = new UnfocusableTextField { StringValue = $"{editor.Name}:", - Alignment = NSTextAlignment.Right + Alignment = NSTextAlignment.Right, + BackgroundColor = NSColor.Clear + }, + Editor = new ComponentSpinEditor (editor) { + BackgroundColor = NSColor.Clear, + TranslatesAutoresizingMaskIntoConstraints = true }, - Editor = new ComponentSpinEditor (editor), Gradient = new UnanimatedGradientLayer { StartPoint = new CGPoint (0, 0), EndPoint = new CGPoint (1, 0), @@ -58,10 +62,7 @@ namespace Xamarin.PropertyEditing.Mac } }; - ce.Editor.TranslatesAutoresizingMaskIntoConstraints = true; ce.Editor.ValueChanged += UpdateComponent; - ce.Editor.BackgroundColor = NSColor.Clear; - ce.Label.BackgroundColor = NSColor.Clear; AddSubview (ce.Label); AddSubview (ce.Editor); -- cgit v1.2.3