11using System ;
22using AppKit ;
3+ using CoreGraphics ;
4+ using Foundation ;
35
46namespace Xamarin . PropertyEditing . Mac
57{
@@ -27,7 +29,7 @@ public EditorContainer (IHostResourceProvider hostResources, IEditorView editorV
2729
2830 this . AddConstraints ( new [ ] {
2931 NSLayoutConstraint . Create ( EditorView . NativeView , NSLayoutAttribute . CenterY , NSLayoutRelation . Equal , this , NSLayoutAttribute . CenterY , 1f , 0f ) ,
30- NSLayoutConstraint . Create ( EditorView . NativeView , NSLayoutAttribute . Left , NSLayoutRelation . Equal , this . label , NSLayoutAttribute . Right , 1f , 5f ) ,
32+ NSLayoutConstraint . Create ( EditorView . NativeView , NSLayoutAttribute . Left , NSLayoutRelation . Equal , this . label , NSLayoutAttribute . Right , 1f , LabelToControlSpacing ) ,
3133 NSLayoutConstraint . Create ( EditorView . NativeView , NSLayoutAttribute . Right , NSLayoutRelation . Equal , this , NSLayoutAttribute . Right , 1f , 0f ) ,
3234 NSLayoutConstraint . Create ( EditorView . NativeView , NSLayoutAttribute . Height , NSLayoutRelation . Equal , this , NSLayoutAttribute . Height , 1f , 0f )
3335 } ) ;
@@ -40,7 +42,10 @@ public IEditorView EditorView {
4042
4143 public string Label {
4244 get { return this . label . StringValue ; }
43- set { this . label . StringValue = value ; }
45+ set {
46+ this . label . StringValue = value + ":" ;
47+ this . label . ToolTip = value ;
48+ }
4449 }
4550
4651 public NSView LeftEdgeView
@@ -95,5 +100,7 @@ public NSColor LabelTextColor {
95100
96101 private NSView leftEdgeView ;
97102 private NSLayoutConstraint leftEdgeLeftConstraint , leftEdgeVCenterConstraint ;
103+ private readonly IHostResourceProvider hostResources ;
104+ private const float LabelToControlSpacing = 5f ;
98105 }
99106}
0 commit comments