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:
authorJose Medrano <josmed@microsoft.com>2022-02-16 20:32:52 +0300
committervs-mobiletools-engineering-service2 <valco@microsoft.com>2022-03-01 18:01:15 +0300
commit7f0a7271fac6f78de8ec7d4d2c945f908759dbc3 (patch)
tree73837db92a8b0e319a9c7db528b7ba67cd6e059e
parentadfe160484da0ee3b70f15bbd5c50235a0eaf7a3 (diff)
Makes some basic editors use ProxyRowResponder in their views
-rw-r--r--Xamarin.PropertyEditing.Mac/Controls/BaseRectangleEditorControl.cs2
-rw-r--r--Xamarin.PropertyEditing.Mac/Controls/BooleanEditorControl.cs5
-rw-r--r--Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs1
-rw-r--r--Xamarin.PropertyEditing.Mac/Controls/CharEditorControl.cs6
-rw-r--r--Xamarin.PropertyEditing.Mac/Controls/CollectionInlineEditorControl.cs1
-rw-r--r--Xamarin.PropertyEditing.Mac/Controls/NumericEditorControl.cs5
-rw-r--r--Xamarin.PropertyEditing.Mac/Controls/PredefinedValuesEditor.cs2
-rw-r--r--Xamarin.PropertyEditing.Mac/Controls/TimeSpanEditorControl.cs4
8 files changed, 22 insertions, 4 deletions
diff --git a/Xamarin.PropertyEditing.Mac/Controls/BaseRectangleEditorControl.cs b/Xamarin.PropertyEditing.Mac/Controls/BaseRectangleEditorControl.cs
index 005ef89..c03ce60 100644
--- a/Xamarin.PropertyEditing.Mac/Controls/BaseRectangleEditorControl.cs
+++ b/Xamarin.PropertyEditing.Mac/Controls/BaseRectangleEditorControl.cs
@@ -33,6 +33,7 @@ namespace Xamarin.PropertyEditing.Mac
BackgroundColor = NSColor.Clear,
Value = 0.0f
};
+ XEditor.ResponderProxy = new ProxyRowResponder(this, ProxyRowType.FirstView);
XEditor.ValueChanged += OnInputUpdated;
YLabel = new UnfocusableTextField {
@@ -63,6 +64,7 @@ namespace Xamarin.PropertyEditing.Mac
BackgroundColor = NSColor.Clear,
Value = 0.0f
};
+ HeightEditor.ResponderProxy = new ProxyRowResponder(this, ProxyRowType.LastView);
HeightEditor.ValueChanged += OnInputUpdated;
AddSubview (XLabel);
diff --git a/Xamarin.PropertyEditing.Mac/Controls/BooleanEditorControl.cs b/Xamarin.PropertyEditing.Mac/Controls/BooleanEditorControl.cs
index d9541a6..47c40ce 100644
--- a/Xamarin.PropertyEditing.Mac/Controls/BooleanEditorControl.cs
+++ b/Xamarin.PropertyEditing.Mac/Controls/BooleanEditorControl.cs
@@ -11,7 +11,10 @@ namespace Xamarin.PropertyEditing.Mac
public BooleanEditorControl (IHostResourceProvider hostResource)
: base (hostResource)
{
- BooleanEditor = new FocusableBooleanButton ();
+ BooleanEditor = new FocusableBooleanButton ()
+ {
+ ResponderProxy = new ProxyRowResponder(this, ProxyRowType.SingleView)
+ };
BooleanEditor.Title = string.Empty;
// update the value on 'enter'
diff --git a/Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs b/Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs
index 53b5513..aee5b0e 100644
--- a/Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs
+++ b/Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs
@@ -56,6 +56,7 @@ namespace Xamarin.PropertyEditing.Mac
ControlSize = NSControlSize.Small,
Font = NSFont.SystemFontOfSize (NSFont.SystemFontSizeForControlSize (NSControlSize.Small)),
TranslatesAutoresizingMaskIntoConstraints = false,
+ ResponderProxy = new ProxyRowResponder(this, ProxyRowType.SingleView)
};
this.popupButtonList = new NSMenu ();
diff --git a/Xamarin.PropertyEditing.Mac/Controls/CharEditorControl.cs b/Xamarin.PropertyEditing.Mac/Controls/CharEditorControl.cs
index f68457d..c46ef2c 100644
--- a/Xamarin.PropertyEditing.Mac/Controls/CharEditorControl.cs
+++ b/Xamarin.PropertyEditing.Mac/Controls/CharEditorControl.cs
@@ -13,7 +13,11 @@ namespace Xamarin.PropertyEditing.Mac
protected override EntryPropertyEditorDelegate<char> CreateDelegate (PropertyViewModel<char> viewModel)
{
- return new CharDelegate (viewModel);
+ var charDelegate = new CharDelegate (viewModel)
+ {
+ ResponderProxy = new ProxyRowResponder (this, ProxyRowType.SingleView)
+ };
+ return charDelegate;
}
protected override void UpdateAccessibilityValues ()
diff --git a/Xamarin.PropertyEditing.Mac/Controls/CollectionInlineEditorControl.cs b/Xamarin.PropertyEditing.Mac/Controls/CollectionInlineEditorControl.cs
index 00608b1..88456c6 100644
--- a/Xamarin.PropertyEditing.Mac/Controls/CollectionInlineEditorControl.cs
+++ b/Xamarin.PropertyEditing.Mac/Controls/CollectionInlineEditorControl.cs
@@ -24,6 +24,7 @@ namespace Xamarin.PropertyEditing.Mac
Title = Properties.Resources.CollectionEditButton,
BezelStyle = NSBezelStyle.Rounded,
AccessibilityEnabled = true,
+ ResponderProxy = new ProxyRowResponder(this, ProxyRowType.SingleView),
AccessibilityHelp = Properties.Resources.AccessibilityCollectionHelp
};
diff --git a/Xamarin.PropertyEditing.Mac/Controls/NumericEditorControl.cs b/Xamarin.PropertyEditing.Mac/Controls/NumericEditorControl.cs
index e56debf..2950ae2 100644
--- a/Xamarin.PropertyEditing.Mac/Controls/NumericEditorControl.cs
+++ b/Xamarin.PropertyEditing.Mac/Controls/NumericEditorControl.cs
@@ -16,7 +16,10 @@ namespace Xamarin.PropertyEditing.Mac
{
base.TranslatesAutoresizingMaskIntoConstraints = false;
- NumericEditor = new NumericSpinEditor<T> (hostResources);
+ NumericEditor = new NumericSpinEditor<T> (hostResources)
+ {
+ ResponderProxy = new ProxyRowResponder (this, ProxyRowType.SingleView)
+ };
NumericEditor.ValueChanged += OnValueChanged;
var t = typeof (T);
diff --git a/Xamarin.PropertyEditing.Mac/Controls/PredefinedValuesEditor.cs b/Xamarin.PropertyEditing.Mac/Controls/PredefinedValuesEditor.cs
index f402bf7..0f7b056 100644
--- a/Xamarin.PropertyEditing.Mac/Controls/PredefinedValuesEditor.cs
+++ b/Xamarin.PropertyEditing.Mac/Controls/PredefinedValuesEditor.cs
@@ -113,6 +113,7 @@ namespace Xamarin.PropertyEditing.Mac
Font = NSFont.SystemFontOfSize (NSFont.SystemFontSizeForControlSize (NSControlSize.Small)),
TranslatesAutoresizingMaskIntoConstraints = false,
StringValue = String.Empty,
+ ResponderProxy = new ProxyRowResponder(this, ProxyRowType.SingleView)
};
this.popupButtonList = new NSMenu ();
@@ -155,6 +156,7 @@ namespace Xamarin.PropertyEditing.Mac
LineBreakMode = NSLineBreakMode.TruncatingTail,
UsesSingleLineMode = true,
},
+ ResponderProxy = new ProxyRowResponder (this, ProxyRowType.SingleView),
ControlSize = NSControlSize.Small,
Font = NSFont.SystemFontOfSize (NSFont.SystemFontSizeForControlSize (NSControlSize.Small)),
TranslatesAutoresizingMaskIntoConstraints = false,
diff --git a/Xamarin.PropertyEditing.Mac/Controls/TimeSpanEditorControl.cs b/Xamarin.PropertyEditing.Mac/Controls/TimeSpanEditorControl.cs
index 222af81..4c60dfc 100644
--- a/Xamarin.PropertyEditing.Mac/Controls/TimeSpanEditorControl.cs
+++ b/Xamarin.PropertyEditing.Mac/Controls/TimeSpanEditorControl.cs
@@ -13,7 +13,9 @@ namespace Xamarin.PropertyEditing.Mac
protected override EntryPropertyEditorDelegate<TimeSpan> CreateDelegate (PropertyViewModel<TimeSpan> viewModel)
{
- return new TimeSpanDelegate (viewModel);
+ return new TimeSpanDelegate (viewModel) {
+ ResponderProxy = new ProxyRowResponder(this, ProxyRowType.SingleView)
+ };
}
protected override void UpdateAccessibilityValues ()