Преглед изворни кода

Disabled most of alt menu navigation cases

Krzysztof Krysiński пре 2 година
родитељ
комит
deb7e87805
2 измењених фајлова са 12 додато и 1 уклоњено
  1. 3 1
      src/PixiEditor/Views/MainWindow.xaml
  2. 9 0
      src/PixiEditor/Views/MainWindow.xaml.cs

+ 3 - 1
src/PixiEditor/Views/MainWindow.xaml

@@ -25,6 +25,7 @@
     xmlns:cmds="clr-namespace:PixiEditor.Models.Commands.XAML"
     xmlns:commandSearch="clr-namespace:PixiEditor.Views.UserControls.CommandSearch"
     xmlns:palettes="clr-namespace:PixiEditor.Views.UserControls.Palettes"
+    KeyDown="MainWindow_OnKeyDown"
     d:DataContext="{d:DesignInstance Type=vm:ViewModelMain}"
     mc:Ignorable="d"
     WindowStyle="None"
@@ -149,6 +150,7 @@
                     <MenuItem
                         Header="_File">
                         <MenuItem
+                            
                             Header="_New"
                             cmds:Menu.Command="PixiEditor.File.New" />
                         <MenuItem
@@ -590,7 +592,7 @@
                                                                     <Border Grid.Column="1" BorderThickness="0 0 1 0" BorderBrush="Black">
                                                                         <StackPanel Orientation="Vertical" Grid.Column="0">
                                                                             <MenuItem
-																		Header="_Select All"
+                                                                                Header="_Select All"
 																		cmds:ContextMenu.Command="PixiEditor.Selection.SelectAll" />
                                                                             <MenuItem
 																		Header="_Deselect"

+ 9 - 0
src/PixiEditor/Views/MainWindow.xaml.cs

@@ -1,5 +1,6 @@
 using System.ComponentModel;
 using System.Windows;
+using System.Windows.Controls;
 using System.Windows.Input;
 using System.Windows.Interop;
 using System.Windows.Media.Imaging;
@@ -235,4 +236,12 @@ internal partial class MainWindow : Window
     {
         DataContext.ActionDisplays[nameof(MainWindow_Drop)] = null;
     }
+
+    private void MainWindow_OnKeyDown(object sender, KeyEventArgs e)
+    {
+        if (e.Key == Key.System) // Disables alt menu item navigation, I hope it won't break anything else.
+        {
+            e.Handled = true;
+        }
+    }
 }