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:
authorLarry Ewing <lewing@microsoft.com>2018-07-16 21:50:28 +0300
committerLarry Ewing <lewing@microsoft.com>2018-07-16 22:05:49 +0300
commit4e37b330069eb27655f87d29b8c1b98a8183fe3d (patch)
tree3db3d4d5419cbb98bec5269115e745c60fb3568a /Xamarin.PropertyEditing.Mac/Controls
parent5feca157277b4007201a3d0561f14e76498de1c8 (diff)
[mac] Work around oddity with EdgeInsets on the TabView
Diffstat (limited to 'Xamarin.PropertyEditing.Mac/Controls')
-rw-r--r--Xamarin.PropertyEditing.Mac/Controls/Custom/MaterialView.cs4
-rw-r--r--Xamarin.PropertyEditing.Mac/Controls/Custom/UnderlinedTabViewController.cs6
2 files changed, 5 insertions, 5 deletions
diff --git a/Xamarin.PropertyEditing.Mac/Controls/Custom/MaterialView.cs b/Xamarin.PropertyEditing.Mac/Controls/Custom/MaterialView.cs
index c9fced8..63f890a 100644
--- a/Xamarin.PropertyEditing.Mac/Controls/Custom/MaterialView.cs
+++ b/Xamarin.PropertyEditing.Mac/Controls/Custom/MaterialView.cs
@@ -117,7 +117,7 @@ namespace Xamarin.PropertyEditing.Mac
foreach (var color in MaterialDesign.NormalColorScale) {
var l = CreateLayer (color.Value);
l.ColorType = MaterialColorType.Normal;
- l.IsSelected = color.Value == MaterialDesign.NormalColor;
+ l.IsSelected = color.Value == MaterialDesign.NormalColor || color.Value == MaterialDesign.Color || color.Value == ViewModel.Solid.Color;
l.Frame = new CGRect (x, 0, width, height);
normal.AddSublayer (l);
x += width;
@@ -141,7 +141,7 @@ namespace Xamarin.PropertyEditing.Mac
foreach (var color in MaterialDesign.AccentColorScale) {
var l = CreateLayer (color.Value);
l.ColorType = MaterialColorType.Accent;
- l.IsSelected = color.Value == MaterialDesign.AccentColor;
+ l.IsSelected = color.Value == MaterialDesign.AccentColor || color.Value == MaterialDesign.Color || color.Value == ViewModel.Solid.Color;
l.Frame = new CGRect (x, 0, width, height);
accent.AddSublayer (l);
x += width;
diff --git a/Xamarin.PropertyEditing.Mac/Controls/Custom/UnderlinedTabViewController.cs b/Xamarin.PropertyEditing.Mac/Controls/Custom/UnderlinedTabViewController.cs
index f520d86..0823089 100644
--- a/Xamarin.PropertyEditing.Mac/Controls/Custom/UnderlinedTabViewController.cs
+++ b/Xamarin.PropertyEditing.Mac/Controls/Custom/UnderlinedTabViewController.cs
@@ -82,18 +82,18 @@ namespace Xamarin.PropertyEditing.Mac
this.outerStack = new NSStackView () {
Orientation = NSUserInterfaceLayoutOrientation.Horizontal,
Spacing = 0,
- EdgeInsets = EdgeInsets
+ EdgeInsets = new NSEdgeInsets (0, edgeInsets.Left, 0, edgeInsets.Right)
};
this.innerStack = new NSStackView () {
Spacing = 0,
Alignment = NSLayoutAttribute.Left,
Orientation = NSUserInterfaceLayoutOrientation.Vertical,
- EdgeInsets = EdgeInsets
+ EdgeInsets = new NSEdgeInsets (edgeInsets.Top, 0, edgeInsets.Bottom, 0)
};
this.outerStack.AddView (this.innerStack, NSStackViewGravity.Leading);
- this.innerStack.AddView (this.tabStack, NSStackViewGravity.Top);
+ this.innerStack.AddView (this.tabStack, NSStackViewGravity.Leading);
this.innerStack.AddView (TabView, NSStackViewGravity.Bottom);
View = this.outerStack;
}