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:
authorDominique Louis <dominique@Dominiques-MacBook-Pro-2.local>2018-11-16 18:33:30 +0300
committerDominique Louis <dominique@Dominiques-MacBook-Pro-2.local>2018-11-21 01:19:25 +0300
commite3def59bc58a73fc9f2a724b5e5ed28a64b6b9eb (patch)
tree920384cdc263609338765d57a115926b022a23a8 /Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs
parent79d8eb9a2ac14f952116ff255b9936679a1d8ba6 (diff)
[Mac] Fix Alignments so they are uniform across controls.
Diffstat (limited to 'Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs')
-rw-r--r--Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs33
1 files changed, 17 insertions, 16 deletions
diff --git a/Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs b/Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs
index ed00525..b565679 100644
--- a/Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs
+++ b/Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs
@@ -41,10 +41,11 @@ namespace Xamarin.PropertyEditing.Mac
{
TranslatesAutoresizingMaskIntoConstraints = false;
- this.popover = new NSPopover ();
- popover.Behavior = NSPopoverBehavior.Transient;
- popover.ContentViewController = brushTabViewController = new BrushTabViewController {
- PreferredContentSize = new CGSize (430, 263)
+ this.popover = new NSPopover {
+ Behavior = NSPopoverBehavior.Transient,
+ ContentViewController = this.brushTabViewController = new BrushTabViewController {
+ PreferredContentSize = new CGSize (430, 263)
+ }
};
this.popUpButton = new ColorPopUpButton {
@@ -53,14 +54,14 @@ namespace Xamarin.PropertyEditing.Mac
Font = NSFont.FromFontName (DefaultFontName, DefaultFontSize),
};
- popupButtonList = new NSMenu ();
- popUpButton.Menu = popupButtonList;
+ this.popupButtonList = new NSMenu ();
+ this.popUpButton.Menu = this.popupButtonList;
this.DoConstraints (new [] {
- popUpButton.ConstraintTo (this, (pub, c) => pub.Width == c.Width - 34),
- popUpButton.ConstraintTo (this, (pub, c) => pub.Height == DefaultControlHeight + 1),
- popUpButton.ConstraintTo (this, (pub, c) => pub.Left == c.Left + 4),
- popUpButton.ConstraintTo (this, (pub, c) => pub.Top == c.Top + 0),
+ this.popUpButton.ConstraintTo (this, (pub, c) => pub.Width == c.Width - 33),
+ this.popUpButton.ConstraintTo (this, (pub, c) => pub.Height == DefaultControlHeight + 1),
+ this.popUpButton.ConstraintTo (this, (pub, c) => pub.Top == c.Top + 0),
+ this.popUpButton.ConstraintTo (this, (pub, c) => pub.Left == c.Left - 1),
});
AddSubview (this.popUpButton);
@@ -119,19 +120,19 @@ namespace Xamarin.PropertyEditing.Mac
protected override void UpdateValue ()
{
this.brushTabViewController.ViewModel = ViewModel;
- this.popUpButton.Popover = (ViewModel?.Property.CanWrite ?? false) ? popover : null;
+ this.popUpButton.Popover = (ViewModel?.Property.CanWrite ?? false) ? this.popover : null;
if (ViewModel.Solid != null) {
var title = GetTitle ();
- if (popupButtonList.Count == 0)
- popupButtonList.AddItem (new NSMenuItem ());
+ if (this.popupButtonList.Count == 0)
+ this.popupButtonList.AddItem (new NSMenuItem ());
- previewLayer.Brush = ViewModel.Value;
- var item = popupButtonList.ItemAt (0);
+ this.previewLayer.Brush = ViewModel.Value;
+ var item = this.popupButtonList.ItemAt (0);
if (item.Title != title) {
item.Title = title;
- item.Image = previewLayer.RenderPreview ();
+ item.Image = this.previewLayer.RenderPreview ();
}
}
}