From 24f6af3d4526ba0c474fb4ea1664676a47bf7794 Mon Sep 17 00:00:00 2001 From: Dominique Louis Date: Mon, 29 Apr 2019 11:06:38 +0100 Subject: [Mac] Move appearance setting calls outside ViewDidChangeEffectiveApperance, so it works on earlier MacOS versions. --- .../Controls/BasePointEditorControl.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'Xamarin.PropertyEditing.Mac/Controls/BasePointEditorControl.cs') diff --git a/Xamarin.PropertyEditing.Mac/Controls/BasePointEditorControl.cs b/Xamarin.PropertyEditing.Mac/Controls/BasePointEditorControl.cs index e964340..e60f5f4 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/BasePointEditorControl.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/BasePointEditorControl.cs @@ -68,13 +68,7 @@ namespace Xamarin.PropertyEditing.Mac NSLayoutConstraint.Create (YLabel, NSLayoutAttribute.CenterX, NSLayoutRelation.Equal, YEditor.Subviews[0], NSLayoutAttribute.CenterX, 1f, 0), }); - ViewDidChangeEffectiveAppearance (); - } - - public override void ViewDidChangeEffectiveAppearance () - { - XLabel.TextColor = HostResources.GetNamedColor (NamedResources.DescriptionLabelColor); - YLabel.TextColor = HostResources.GetNamedColor (NamedResources.DescriptionLabelColor); + AppearanceChanged (); } protected override void SetEnabled () @@ -96,5 +90,13 @@ namespace Xamarin.PropertyEditing.Mac { ViewModel.Value = (T)Activator.CreateInstance (typeof (T), XEditor.Value, YEditor.Value); } + + protected override void AppearanceChanged () + { + base.AppearanceChanged (); + + XLabel.TextColor = HostResources.GetNamedColor (NamedResources.DescriptionLabelColor); + YLabel.TextColor = HostResources.GetNamedColor (NamedResources.DescriptionLabelColor); + } } } -- cgit v1.2.3