mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
- Add HotkeyRecorderDialog with global keyboard hook for capturing hotkeys - Implement manual modifier state tracking to handle swallowed key events - Add HotkeyControl button that opens the recorder dialog - Add CheckAvailability and RemoveToggleHotkey to HotKeyMapper - Expose GetKeyFromVk helper in GlobalHotkey infrastructure - Add Settings pages (General, Plugin, Theme, Proxy, About) - Add PreviewPanel for result previews in main window - Fix hook reuse issue by clearing callback on close instead of disposing
36 lines
1.7 KiB
XML
36 lines
1.7 KiB
XML
<UserControl 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"
|
|
mc:Ignorable="d" d:DesignWidth="300" d:DesignHeight="50"
|
|
x:Class="Flow.Launcher.Avalonia.Views.Controls.HotkeyControl"
|
|
x:Name="root">
|
|
|
|
<Button Command="{Binding #root.RecordHotkeyCommand}"
|
|
Padding="8,4"
|
|
Background="{DynamicResource ControlFillColorDefaultBrush}"
|
|
BorderBrush="{DynamicResource ControlElevationBorderBrush}"
|
|
BorderThickness="1"
|
|
CornerRadius="4"
|
|
HorizontalAlignment="Left">
|
|
<ItemsControl ItemsSource="{Binding #root.KeysToDisplay}">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<StackPanel Orientation="Horizontal" Spacing="4" />
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<Border Padding="6,2"
|
|
Background="{DynamicResource AccentFillColorDefaultBrush}"
|
|
CornerRadius="4">
|
|
<TextBlock Text="{Binding}"
|
|
Foreground="{DynamicResource TextOnAccentFillColorPrimaryBrush}"
|
|
FontSize="12"
|
|
FontWeight="SemiBold" />
|
|
</Border>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</Button>
|
|
</UserControl>
|