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-25 07:55:23 +0300
committervs-mobiletools-engineering-service2 <valco@microsoft.com>2022-03-01 18:01:15 +0300
commitb3b7d78f92cdf1c3dc5f85cfb8e0415595fe7343 (patch)
treef159e4b7682018e6d1aa0133cad3aea9941bf59a
parent2ca0edb87fb052380e1730301eaa3199aea7ddda (diff)
Adds some missing ProxyResponders
-rw-r--r--Xamarin.PropertyEditing.Mac/Controls/CombinablePropertyEditor.cs17
-rw-r--r--Xamarin.PropertyEditing.Mac/Controls/EntryPropertyEditor.cs7
-rw-r--r--Xamarin.PropertyEditing.Mac/Controls/NumericEditorControl.cs5
-rw-r--r--Xamarin.PropertyEditing.Mac/Controls/PredefinedValuesEditor.cs8
-rw-r--r--Xamarin.PropertyEditing.Mac/Controls/StringEditorControl.cs4
-rw-r--r--Xamarin.PropertyEditing.Mac/Controls/TypeEditorControl.cs4
6 files changed, 34 insertions, 11 deletions
diff --git a/Xamarin.PropertyEditing.Mac/Controls/CombinablePropertyEditor.cs b/Xamarin.PropertyEditing.Mac/Controls/CombinablePropertyEditor.cs
index 5122f24..7aeaaf3 100644
--- a/Xamarin.PropertyEditing.Mac/Controls/CombinablePropertyEditor.cs
+++ b/Xamarin.PropertyEditing.Mac/Controls/CombinablePropertyEditor.cs
@@ -83,8 +83,21 @@ namespace Xamarin.PropertyEditing.Mac
}
// Set our tabable order
- this.firstKeyView = this.combinableList.KeyAt (0);
- this.lastKeyView = this.combinableList.KeyAt (this.combinableList.Count - 1);
+ var firstButton = (FocusableBooleanButton) this.combinableList.KeyAt (0);
+ this.firstKeyView = firstButton;
+
+ var lastButton = (FocusableBooleanButton)this.combinableList.KeyAt (this.combinableList.Count - 1);
+ this.lastKeyView = lastButton;
+
+ if (combinableList.Count > 0)
+ {
+ if (firstButton == lastButton) {
+ firstButton.ProxyResponder = new RowProxyResponder (this, ProxyRowType.SingleView);
+ } else {
+ firstButton.ProxyResponder = new RowProxyResponder (this, ProxyRowType.FirstView);
+ lastButton.ProxyResponder = new RowProxyResponder (this, ProxyRowType.LastView);
+ }
+ }
SetEnabled ();
diff --git a/Xamarin.PropertyEditing.Mac/Controls/EntryPropertyEditor.cs b/Xamarin.PropertyEditing.Mac/Controls/EntryPropertyEditor.cs
index 1ab1b64..1017d99 100644
--- a/Xamarin.PropertyEditing.Mac/Controls/EntryPropertyEditor.cs
+++ b/Xamarin.PropertyEditing.Mac/Controls/EntryPropertyEditor.cs
@@ -44,6 +44,11 @@ namespace Xamarin.PropertyEditing.Mac
};
AddSubview (Entry);
+ Entry.Delegate = new TextNextResponderDelegate ()
+ {
+ ProxyResponder = new RowProxyResponder(this, ProxyRowType.SingleView)
+ };
+
RightEdgeConstraint = NSLayoutConstraint.Create (Entry, NSLayoutAttribute.Right, NSLayoutRelation.Equal, this, NSLayoutAttribute.Right, 1f, 0);
AddConstraints (new[] {
NSLayoutConstraint.Create (Entry, NSLayoutAttribute.CenterY, NSLayoutRelation.Equal, this, NSLayoutAttribute.CenterY, 1f, 0),
@@ -88,7 +93,7 @@ namespace Xamarin.PropertyEditing.Mac
{
var propertyEditorDelegate = new EntryPropertyEditorDelegate<T> (viewModel)
{
- ProxyResponder = new RowProxyResponder (this, ProxyRowType.SingleView)
+ ProxyResponder = new RowProxyResponder (this, ProxyRowType.SingleView)
};
return propertyEditorDelegate;
}
diff --git a/Xamarin.PropertyEditing.Mac/Controls/NumericEditorControl.cs b/Xamarin.PropertyEditing.Mac/Controls/NumericEditorControl.cs
index 7b34787..4687e0c 100644
--- a/Xamarin.PropertyEditing.Mac/Controls/NumericEditorControl.cs
+++ b/Xamarin.PropertyEditing.Mac/Controls/NumericEditorControl.cs
@@ -132,6 +132,9 @@ namespace Xamarin.PropertyEditing.Mac
TranslatesAutoresizingMaskIntoConstraints = false,
};
+ this.NumericEditor.ProxyResponder = new RowProxyResponder (this, ProxyRowType.FirstView);
+ this.inputModePopup.ProxyResponder = new RowProxyResponder (this, ProxyRowType.LastView);
+
this.inputModePopup.Activated += (o, e) => {
var popupButton = o as NSPopUpButton;
ViewModel.InputMode = this.viewModelInputModes.FirstOrDefault (im => im.Identifier == popupButton.Title);
@@ -166,7 +169,7 @@ namespace Xamarin.PropertyEditing.Mac
private Type underlyingType;
- internal NSPopUpButton inputModePopup;
+ internal FocusablePopUpButton inputModePopup;
private IReadOnlyList<InputMode> viewModelInputModes;
private readonly NSLayoutConstraint editorRightConstraint;
diff --git a/Xamarin.PropertyEditing.Mac/Controls/PredefinedValuesEditor.cs b/Xamarin.PropertyEditing.Mac/Controls/PredefinedValuesEditor.cs
index 1ca92ee..ae3d307 100644
--- a/Xamarin.PropertyEditing.Mac/Controls/PredefinedValuesEditor.cs
+++ b/Xamarin.PropertyEditing.Mac/Controls/PredefinedValuesEditor.cs
@@ -74,8 +74,8 @@ namespace Xamarin.PropertyEditing.Mac
}
}
- private NSComboBox comboBox;
- private NSPopUpButton popupButton;
+ private FocusableComboBox comboBox;
+ private FocusablePopUpButton popupButton;
private NSMenu popupButtonList;
private NSView firstKeyView;
@@ -115,7 +115,7 @@ namespace Xamarin.PropertyEditing.Mac
StringValue = String.Empty,
ProxyResponder = new RowProxyResponder (this, ProxyRowType.SingleView)
};
-
+ this.popupButton.ProxyResponder = new RowProxyResponder (this, ProxyRowType.SingleView);
this.popupButtonList = new NSMenu ();
this.popupButton.Menu = this.popupButtonList;
this.popupButton.Activated += PopupButton_Activated;
@@ -162,7 +162,7 @@ namespace Xamarin.PropertyEditing.Mac
TranslatesAutoresizingMaskIntoConstraints = false,
StringValue = String.Empty,
};
-
+ this.comboBox.ProxyResponder = new RowProxyResponder (this, ProxyRowType.SingleView);
this.comboBox.SelectionChanged += ComboBox_SelectionChanged;
AddSubview (this.comboBox);
diff --git a/Xamarin.PropertyEditing.Mac/Controls/StringEditorControl.cs b/Xamarin.PropertyEditing.Mac/Controls/StringEditorControl.cs
index e10ec78..80ff123 100644
--- a/Xamarin.PropertyEditing.Mac/Controls/StringEditorControl.cs
+++ b/Xamarin.PropertyEditing.Mac/Controls/StringEditorControl.cs
@@ -45,7 +45,7 @@ namespace Xamarin.PropertyEditing.Mac
Font = NSFont.SystemFontOfSize (NSFont.SystemFontSizeForControlSize (NSControlSize.Small)),
TranslatesAutoresizingMaskIntoConstraints = false
};
-
+ this.inputModePopup.ProxyResponder = new RowProxyResponder (this, ProxyRowType.SingleView);
this.inputModePopup.Activated += (o, e) => {
var popupButton = o as NSPopUpButton;
ViewModel.InputMode = this.viewModelInputModes.FirstOrDefault (im => im.Identifier == popupButton.Title);
@@ -104,7 +104,7 @@ namespace Xamarin.PropertyEditing.Mac
private NSView lastKeyView;
private NSLayoutConstraint editorInputModeConstraint;
- private NSPopUpButton inputModePopup;
+ private FocusablePopUpButton inputModePopup;
private IReadOnlyList<InputMode> viewModelInputModes;
}
}
diff --git a/Xamarin.PropertyEditing.Mac/Controls/TypeEditorControl.cs b/Xamarin.PropertyEditing.Mac/Controls/TypeEditorControl.cs
index 9ee86d1..381244a 100644
--- a/Xamarin.PropertyEditing.Mac/Controls/TypeEditorControl.cs
+++ b/Xamarin.PropertyEditing.Mac/Controls/TypeEditorControl.cs
@@ -22,7 +22,9 @@ namespace Xamarin.PropertyEditing.Mac
this.selectType = new FocusableButton {
BezelStyle = NSBezelStyle.Rounded,
Title = Properties.Resources.Select,
+ ProxyResponder = new RowProxyResponder(this, ProxyRowType.SingleView)
};
+
this.selectType.Activated += OnSelectPressed;
AddSubview (this.selectType);
@@ -89,7 +91,7 @@ namespace Xamarin.PropertyEditing.Mac
}
private readonly UnfocusableTextField typeLabel;
- private readonly NSButton selectType;
+ private readonly FocusableButton selectType;
private void OnTypeRequested (object sender, TypeRequestedEventArgs e)
{