diff options
author | Dominique Louis <savagesoftware@gmail.com> | 2019-05-01 17:18:55 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-01 17:18:55 +0300 |
commit | f74e027bd387a82be39e9458ddea1d9edfefaa0a (patch) | |
tree | 106aff18d3abd48bec9026a16e0ed819e28b2551 /Xamarin.PropertyEditing.Mac/Controls/BasePointEditorControl.cs | |
parent | 40c2ea08e7c2796b73e464bda91353551a477e27 (diff) | |
parent | 0cd63e77cd637189dd901bc29cca8286ab9fdf7e (diff) |
Merge pull request #590 from xamarin/dominique-Fix587
[Mac] Move appearance setting calls outside ViewDidChangeEffectiveApp…
Diffstat (limited to 'Xamarin.PropertyEditing.Mac/Controls/BasePointEditorControl.cs')
-rw-r--r-- | Xamarin.PropertyEditing.Mac/Controls/BasePointEditorControl.cs | 16 |
1 files changed, 9 insertions, 7 deletions
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); + } } } |