|
@@ -0,0 +1,80 @@
|
|
|
+<dialogs:PixiEditorPopup xmlns="https://github.com/avaloniaui"
|
|
|
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
+ xmlns:ui="clr-namespace:PixiEditor.Extensions.UI;assembly=PixiEditor.Extensions"
|
|
|
+ xmlns:dialogs="clr-namespace:PixiEditor.AvaloniaUI.Views.Dialogs"
|
|
|
+ xmlns:commands="clr-namespace:PixiEditor.AvaloniaUI.Models.Commands"
|
|
|
+ xmlns:commands1="clr-namespace:PixiEditor.AvaloniaUI.Models.Commands.XAML"
|
|
|
+ xmlns:converters="clr-namespace:PixiEditor.AvaloniaUI.Helpers.Converters"
|
|
|
+ xmlns:commands2="clr-namespace:PixiEditor.AvaloniaUI.Models.Commands.Commands"
|
|
|
+ mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
|
+ x:Class="PixiEditor.AvaloniaUI.Views.Dialogs.ShortcutsPopup"
|
|
|
+ x:ClassModifier="internal"
|
|
|
+ Title="ShortcutsPopup">
|
|
|
+ <Grid>
|
|
|
+ <TextBlock Grid.Row="0" FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Center" ui:Translator.Key="SHORTCUTS_TITLE"/>
|
|
|
+
|
|
|
+ <DockPanel Grid.Row="3">
|
|
|
+ <TextBlock FontSize="14" Margin="10" Foreground="LightGray" HorizontalAlignment="Left" DockPanel.Dock="Bottom">
|
|
|
+ <!--TODO: Add this-->
|
|
|
+ <!--<Hyperlink Style="{StaticResource SettingsLink}"
|
|
|
+ Command="{cmds:Command PixiEditor.Window.OpenSettingsWindow, UseProvided=True}">
|
|
|
+ <Hyperlink.CommandParameter>
|
|
|
+ <s:Int32>2</s:Int32>
|
|
|
+ </Hyperlink.CommandParameter>
|
|
|
+ <Run ui:Translator.Key="EDIT"/>
|
|
|
+ <Run Text="" FontFamily="{StaticResource Feather}"/>
|
|
|
+ </Hyperlink>-->
|
|
|
+ </TextBlock>
|
|
|
+ <ScrollViewer Grid.Row="3" VerticalScrollBarVisibility="Auto">
|
|
|
+ <WrapPanel HorizontalAlignment="Center" Margin="2">
|
|
|
+ <ItemsControl ItemsSource="{Binding Controller.CommandGroups}" Background="Transparent">
|
|
|
+ <ItemsControl.ItemTemplate>
|
|
|
+ <DataTemplate DataType="{x:Type commands:CommandGroup}">
|
|
|
+ <StackPanel IsVisible="{Binding HasAssignedShortcuts}">
|
|
|
+ <TextBlock Text="{Binding DisplayName}" Foreground="White" FontSize="15" FontWeight="Medium" Margin="10,8,0,5"/>
|
|
|
+ <ItemsControl ItemsSource="{Binding VisibleCommands}">
|
|
|
+ <ItemsControl.ItemTemplate>
|
|
|
+ <DataTemplate DataType="{x:Type commands2:Command}">
|
|
|
+ <StackPanel Orientation="Horizontal" Margin="20,0,0,0" IsVisible="{Binding Shortcut.Key, ConverterParameter=None, Converter={converters:EqualityBoolToIsVisibleConverter Invert=True}}"
|
|
|
+ ToolTip.Tip="{Binding Description}">
|
|
|
+ <ItemsControl ItemsSource="{Binding Shortcut.Modifiers, Converter={converters:ModifierFlagToModifiersConverter}}">
|
|
|
+ <ItemsControl.ItemTemplate>
|
|
|
+ <DataTemplate DataType="{x:Type KeyModifiers}">
|
|
|
+ <Border Classes="KeyBorder">
|
|
|
+ <!--TODO: BindsDirectlyToSource=True was here-->
|
|
|
+ <TextBlock ui:Translator.LocalizedString="{Binding Converter={converters:KeyToStringConverter}}"
|
|
|
+ Classes="KeyBorderText"/>
|
|
|
+ </Border>
|
|
|
+ </DataTemplate>
|
|
|
+ </ItemsControl.ItemTemplate>
|
|
|
+ <ItemsControl.ItemsPanel>
|
|
|
+ <ItemsPanelTemplate>
|
|
|
+ <StackPanel Orientation="Horizontal"/>
|
|
|
+ </ItemsPanelTemplate>
|
|
|
+ </ItemsControl.ItemsPanel>
|
|
|
+ </ItemsControl>
|
|
|
+ <Border Classes="KeyBorderLast">
|
|
|
+ <TextBlock Text="{Binding Shortcut.Key, Converter={converters:KeyToStringConverter}}" Classes="KeyBorderText"/>
|
|
|
+ </Border>
|
|
|
+
|
|
|
+ <TextBlock Text="{Binding DisplayName}" Foreground="#FFEEEEEE" VerticalAlignment="Center" FontSize="14" Margin="8,0,0,0"/>
|
|
|
+ </StackPanel>
|
|
|
+ </DataTemplate>
|
|
|
+ </ItemsControl.ItemTemplate>
|
|
|
+ </ItemsControl>
|
|
|
+ </StackPanel>
|
|
|
+ </DataTemplate>
|
|
|
+ </ItemsControl.ItemTemplate>
|
|
|
+ <ItemsControl.ItemsPanel>
|
|
|
+ <ItemsPanelTemplate>
|
|
|
+ <WrapPanel ItemWidth="300"/>
|
|
|
+ </ItemsPanelTemplate>
|
|
|
+ </ItemsControl.ItemsPanel>
|
|
|
+ </ItemsControl>
|
|
|
+ </WrapPanel>
|
|
|
+ </ScrollViewer>
|
|
|
+ </DockPanel>
|
|
|
+ </Grid>
|
|
|
+</dialogs:PixiEditorPopup>
|