Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xamarin/Xamarin.PropertyEditing.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Maupin <ermaup@microsoft.com>2019-01-03 22:44:37 +0300
committerEric Maupin <ermaup@microsoft.com>2019-01-11 23:19:25 +0300
commit71ad75860e1c5b6c33163d390988dbfbf409b4ac (patch)
tree80f6ed1ac0a1a0face888e3481f802f4d328a312 /Xamarin.PropertyEditing.Mac/Controls/ErrorMessageView.cs
parent104acbcc9c62e1a90e9e43cb7630583cb2b49ca4 (diff)
[mac] Revamp theming
This commit: - Drops outdated CG* editors - Drops ThemeManager - Introduces IHostResourceProvider - Moves all images to new API - Starts implementing colors
Diffstat (limited to 'Xamarin.PropertyEditing.Mac/Controls/ErrorMessageView.cs')
-rw-r--r--Xamarin.PropertyEditing.Mac/Controls/ErrorMessageView.cs6
1 files changed, 2 insertions, 4 deletions
diff --git a/Xamarin.PropertyEditing.Mac/Controls/ErrorMessageView.cs b/Xamarin.PropertyEditing.Mac/Controls/ErrorMessageView.cs
index 7089718..8f76498 100644
--- a/Xamarin.PropertyEditing.Mac/Controls/ErrorMessageView.cs
+++ b/Xamarin.PropertyEditing.Mac/Controls/ErrorMessageView.cs
@@ -13,7 +13,7 @@ namespace Xamarin.PropertyEditing.Mac
private NSTextField errorMessages;
- public ErrorMessageView (IEnumerable errors)
+ public ErrorMessageView (IHostResourceProvider hostResources, IEnumerable errors)
{
if (errors == null)
throw new ArgumentNullException (nameof (errors));
@@ -22,7 +22,7 @@ namespace Xamarin.PropertyEditing.Mac
var iconView = new NSButton (new CGRect (5, Frame.Height - 25, DefaultIconButtonSize, DefaultIconButtonSize)) {
Bordered = false,
- Image = PropertyEditorPanel.ThemeManager.GetImageForTheme ("action-warning-16"),
+ Image = hostResources.GetNamedImage ("action-warning-16"),
Title = string.Empty,
TranslatesAutoresizingMaskIntoConstraints = false,
};
@@ -62,8 +62,6 @@ namespace Xamarin.PropertyEditing.Mac
NSLayoutConstraint.Create (this.errorMessages, NSLayoutAttribute.Width, NSLayoutRelation.Equal, this, NSLayoutAttribute.Width, 1f, -10f),
NSLayoutConstraint.Create (this.errorMessages, NSLayoutAttribute.Height, NSLayoutRelation.Equal, this, NSLayoutAttribute.Height, 1f, -40f),
});
-
- this.Appearance = PropertyEditorPanel.ThemeManager.CurrentAppearance;
}
}
}