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 <me@ermau.com>2019-02-20 19:40:48 +0300
committerGitHub <noreply@github.com>2019-02-20 19:40:48 +0300
commit9c1e6131226c31a147f5ff205ebf014458189b15 (patch)
tree7cda2b699f397924789c5d8c043fd0d0d8d3c084 /Xamarin.PropertyEditing.Mac
parentf4273f41a9a221d8baad04604138381b272f8437 (diff)
parent5c8bcbd7db4a26e4fa00bff26ed1ebd07e85a0f4 (diff)
Merge pull request #529 from xamarin/dominique-SetTooltipIncasePropertyLabelClipped
[Mac] Set Tooltip value for when resizing occurs & long properties areā€¦
Diffstat (limited to 'Xamarin.PropertyEditing.Mac')
-rw-r--r--Xamarin.PropertyEditing.Mac/Controls/EditorContainer.cs11
-rw-r--r--Xamarin.PropertyEditing.Mac/PropertyTableDelegate.cs2
2 files changed, 10 insertions, 3 deletions
diff --git a/Xamarin.PropertyEditing.Mac/Controls/EditorContainer.cs b/Xamarin.PropertyEditing.Mac/Controls/EditorContainer.cs
index d086c10..075cfd1 100644
--- a/Xamarin.PropertyEditing.Mac/Controls/EditorContainer.cs
+++ b/Xamarin.PropertyEditing.Mac/Controls/EditorContainer.cs
@@ -1,5 +1,7 @@
using System;
using AppKit;
+using CoreGraphics;
+using Foundation;
namespace Xamarin.PropertyEditing.Mac
{
@@ -27,7 +29,7 @@ namespace Xamarin.PropertyEditing.Mac
this.AddConstraints (new[] {
NSLayoutConstraint.Create (EditorView.NativeView, NSLayoutAttribute.CenterY, NSLayoutRelation.Equal, this, NSLayoutAttribute.CenterY, 1f, 0f),
- NSLayoutConstraint.Create (EditorView.NativeView, NSLayoutAttribute.Left, NSLayoutRelation.Equal, this.label, NSLayoutAttribute.Right, 1f, 5f),
+ NSLayoutConstraint.Create (EditorView.NativeView, NSLayoutAttribute.Left, NSLayoutRelation.Equal, this.label, NSLayoutAttribute.Right, 1f, LabelToControlSpacing),
NSLayoutConstraint.Create (EditorView.NativeView, NSLayoutAttribute.Right, NSLayoutRelation.Equal, this, NSLayoutAttribute.Right, 1f, 0f),
NSLayoutConstraint.Create (EditorView.NativeView, NSLayoutAttribute.Height, NSLayoutRelation.Equal, this, NSLayoutAttribute.Height, 1f, 0f)
});
@@ -40,7 +42,10 @@ namespace Xamarin.PropertyEditing.Mac
public string Label {
get { return this.label.StringValue; }
- set { this.label.StringValue = value; }
+ set {
+ this.label.StringValue = value + ":";
+ this.label.ToolTip = value;
+ }
}
public NSView LeftEdgeView
@@ -95,5 +100,7 @@ namespace Xamarin.PropertyEditing.Mac
private NSView leftEdgeView;
private NSLayoutConstraint leftEdgeLeftConstraint, leftEdgeVCenterConstraint;
+ private readonly IHostResourceProvider hostResources;
+ private const float LabelToControlSpacing = 5f;
}
}
diff --git a/Xamarin.PropertyEditing.Mac/PropertyTableDelegate.cs b/Xamarin.PropertyEditing.Mac/PropertyTableDelegate.cs
index 608d18b..bce86c0 100644
--- a/Xamarin.PropertyEditing.Mac/PropertyTableDelegate.cs
+++ b/Xamarin.PropertyEditing.Mac/PropertyTableDelegate.cs
@@ -97,7 +97,7 @@ namespace Xamarin.PropertyEditing.Mac
}
if (editorOrContainer is EditorContainer ec) {
- ec.Label = evm.Name + ":";
+ ec.Label = evm.Name;
#if DEBUG // Currently only used to highlight which controls haven't been implemented
if (editor == null)