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/BrushEditorControl.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/BrushEditorControl.cs')
-rw-r--r--Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs15
1 files changed, 8 insertions, 7 deletions
diff --git a/Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs b/Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs
index 91cc77e..906ddea 100644
--- a/Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs
+++ b/Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs
@@ -49,13 +49,18 @@ namespace Xamarin.PropertyEditing.Mac
internal class BrushEditorControl : PropertyEditorControl<BrushPropertyViewModel>
{
- public BrushEditorControl ()
+ public BrushEditorControl (IHostResourceProvider hostResources)
+ : base (hostResources)
{
TranslatesAutoresizingMaskIntoConstraints = false;
+ this.previewLayer = new CommonBrushLayer (hostResources) {
+ Frame = new CGRect (0, 0, 30, 10)
+ };
+
this.popover = new NSPopover {
Behavior = NSPopoverBehavior.Transient,
- ContentViewController = this.brushTabViewController = new BrushTabViewController {
+ ContentViewController = this.brushTabViewController = new BrushTabViewController (hostResources) {
PreferredContentSize = new CGSize (430, 263)
}
};
@@ -75,8 +80,6 @@ namespace Xamarin.PropertyEditing.Mac
NSLayoutConstraint.Create (this.popUpButton, NSLayoutAttribute.Width, NSLayoutRelation.Equal, this, NSLayoutAttribute.Width, 1f, -33f),
NSLayoutConstraint.Create (this.popUpButton, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, DefaultControlHeight - 3),
});
-
- UpdateTheme ();
}
@@ -84,9 +87,7 @@ namespace Xamarin.PropertyEditing.Mac
readonly NSPopover popover;
readonly BrushTabViewController brushTabViewController;
readonly NSMenu popupButtonList;
- readonly CommonBrushLayer previewLayer = new CommonBrushLayer {
- Frame = new CGRect (0, 0, 30, 10)
- };
+ readonly CommonBrushLayer previewLayer;
public override NSView FirstKeyView => this.popUpButton;
public override NSView LastKeyView => this.popUpButton;