Skip to content

Commit

Permalink
Prevent ambigous types when building for Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
hamster620 committed Nov 14, 2022
1 parent b032177 commit f536f98
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ULogViewer/Controls/LogStringPropertyDialog.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public LogStringPropertyDialog()
this.SetValue<string>(LogPropertyDisplayNameProperty, LogPropertyNameConverter.Default.Convert(nameof(Log.Message)));
this.AddHandler(KeyDownEvent, (_, e) =>
{
if (e.Key == Key.F)
if (e.Key == Avalonia.Input.Key.F)
{
var modifier = Platform.IsMacOS ? KeyModifiers.Meta : KeyModifiers.Control;
if ((e.KeyModifiers & modifier) != 0)
Expand Down
10 changes: 5 additions & 5 deletions ULogViewer/MainWindow.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -788,28 +788,28 @@ protected override void OnInitialDialogsClosed()


// Called when key down.
protected override void OnKeyDown(KeyEventArgs e)
protected override void OnKeyDown(Avalonia.Input.KeyEventArgs e)
{
// handle key event for combo keys
if (!e.Handled && (e.KeyModifiers & KeyModifiers.Control) != 0)
{
switch (e.Key)
{
case Key.N:
case Avalonia.Input.Key.N:
if (!Platform.IsMacOS)
{
this.CreateMainWindow();
e.Handled = true;
}
break;
case Key.T:
case Avalonia.Input.Key.T:
if (!Platform.IsMacOS)
{
this.CreateSessionTabItem();
e.Handled = true;
}
break;
case Key.Tab:
case Avalonia.Input.Key.Tab:
if (this.tabItems.Count > 2)
{
var index = this.tabControl.SelectedIndex;
Expand All @@ -829,7 +829,7 @@ protected override void OnKeyDown(KeyEventArgs e)
}
e.Handled = true;
break;
case Key.W:
case Avalonia.Input.Key.W:
if (!Platform.IsMacOS)
{
this.CloseCurrentSessionTabItem();
Expand Down

0 comments on commit f536f98

Please sign in to comment.