José Pedro
6 years ago
No known key found for this signature in database
GPG Key ID: B8247B9301707B83
4 changed files with
5 additions and
9 deletions
-
src/Avalonia.Controls/ContextMenu.cs
-
src/Avalonia.Input/NavigationDirection.cs
-
src/Avalonia.Themes.Default/ComboBox.xaml
-
src/Avalonia.Themes.Default/MenuItem.xaml
|
|
|
@ -104,8 +104,7 @@ namespace Avalonia.Controls |
|
|
|
{ |
|
|
|
PlacementMode = PlacementMode.Pointer, |
|
|
|
PlacementTarget = control, |
|
|
|
StaysOpen = false, |
|
|
|
ObeyScreenEdges = true |
|
|
|
StaysOpen = false |
|
|
|
}; |
|
|
|
|
|
|
|
_popup.Opened += PopupOpened; |
|
|
|
|
|
|
|
@ -100,12 +100,12 @@ namespace Avalonia.Input |
|
|
|
/// </returns>
|
|
|
|
public static NavigationDirection? ToNavigationDirection( |
|
|
|
this Key key, |
|
|
|
InputModifiers modifiers = InputModifiers.None) |
|
|
|
KeyModifiers modifiers = KeyModifiers.None) |
|
|
|
{ |
|
|
|
switch (key) |
|
|
|
{ |
|
|
|
case Key.Tab: |
|
|
|
return (modifiers & InputModifiers.Shift) != 0 ? |
|
|
|
return (modifiers & KeyModifiers.Shift) != 0 ? |
|
|
|
NavigationDirection.Next : NavigationDirection.Previous; |
|
|
|
case Key.Up: |
|
|
|
return NavigationDirection.Up; |
|
|
|
|
|
|
|
@ -37,7 +37,6 @@ |
|
|
|
MinWidth="{Binding Bounds.Width, RelativeSource={RelativeSource TemplatedParent}}" |
|
|
|
MaxHeight="{TemplateBinding MaxDropDownHeight}" |
|
|
|
PlacementTarget="{TemplateBinding}" |
|
|
|
ObeyScreenEdges="True" |
|
|
|
StaysOpen="False"> |
|
|
|
<Border BorderBrush="{DynamicResource ThemeBorderMidBrush}" |
|
|
|
BorderThickness="1"> |
|
|
|
|
|
|
|
@ -45,8 +45,7 @@ |
|
|
|
<Popup Name="PART_Popup" |
|
|
|
PlacementMode="Right" |
|
|
|
StaysOpen="True" |
|
|
|
IsOpen="{TemplateBinding IsSubMenuOpen, Mode=TwoWay}" |
|
|
|
ObeyScreenEdges="True"> |
|
|
|
IsOpen="{TemplateBinding IsSubMenuOpen, Mode=TwoWay}"> |
|
|
|
<Border Background="{TemplateBinding Background}" |
|
|
|
BorderBrush="{DynamicResource ThemeBorderMidBrush}" |
|
|
|
BorderThickness="{TemplateBinding BorderThickness}"> |
|
|
|
@ -95,8 +94,7 @@ |
|
|
|
</ContentPresenter> |
|
|
|
<Popup Name="PART_Popup" |
|
|
|
IsOpen="{TemplateBinding IsSubMenuOpen, Mode=TwoWay}" |
|
|
|
StaysOpen="True" |
|
|
|
ObeyScreenEdges="True"> |
|
|
|
StaysOpen="True"> |
|
|
|
<Border Background="{TemplateBinding Background}" |
|
|
|
BorderBrush="{DynamicResource ThemeBorderMidBrush}" |
|
|
|
BorderThickness="{TemplateBinding BorderThickness}"> |
|
|
|
|