mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Adjust HotkeyPopup Style
This commit is contained in:
parent
1ededb9c43
commit
b5bd37094f
3 changed files with 100 additions and 30 deletions
|
|
@ -3,7 +3,12 @@
|
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:ui="http://schemas.modernwpf.com/2019"
|
||||
Background="{DynamicResource PopuBGColor}"
|
||||
BorderBrush="{DynamicResource PopupButtonAreaBorderColor}"
|
||||
BorderThickness="0,1,0,0"
|
||||
CornerRadius="8"
|
||||
DataContext="{Binding RelativeSource={RelativeSource Self}}"
|
||||
Foreground="{DynamicResource PopupTextColor}"
|
||||
PreviewKeyDown="OnPreviewKeyDown"
|
||||
Style="{DynamicResource ContentDialog}">
|
||||
<ui:ContentDialog.Resources>
|
||||
|
|
@ -12,26 +17,40 @@
|
|||
</ui:ContentDialog.Resources>
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="80" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Window title and the keys in the hotkey -->
|
||||
<Grid Grid.Row="0" Grid.Column="0">
|
||||
<Grid
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Margin="26,12,26,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Row="0" Text="{Binding WindowTitle}" />
|
||||
<StackPanel>
|
||||
<TextBlock
|
||||
Margin="0,0,0,0"
|
||||
FontSize="20"
|
||||
FontWeight="SemiBold"
|
||||
Text="{Binding WindowTitle}"
|
||||
TextAlignment="Left" />
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
FontSize="14"
|
||||
Text="{DynamicResource hotkeyRegGuide}" />
|
||||
</StackPanel>
|
||||
<Border
|
||||
Grid.Row="1"
|
||||
Width="350"
|
||||
Height="200">
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
Width="450"
|
||||
Height="250"
|
||||
Padding="26,12,26,0">
|
||||
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<ItemsControl ItemsSource="{Binding KeysToDisplay}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
|
|
@ -42,11 +61,20 @@
|
|||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border
|
||||
MinWidth="50"
|
||||
MinHeight="50"
|
||||
Margin="5,0,5,0"
|
||||
Padding="8"
|
||||
Background="Red"
|
||||
Background="{DynamicResource AccentButtonBackground}"
|
||||
CornerRadius="6">
|
||||
<TextBlock Text="{Binding}" />
|
||||
<TextBlock
|
||||
Margin="5,0,5,0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="18"
|
||||
FontWeight="Bold"
|
||||
Foreground="{DynamicResource Color01B}"
|
||||
Text="{Binding}" />
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
|
|
@ -56,24 +84,60 @@
|
|||
</Grid>
|
||||
|
||||
<!-- Action buttons to the right of the title and keys -->
|
||||
<StackPanel Grid.Row="0" Grid.Column="1">
|
||||
<Button Click="Reset" Content="Reset" />
|
||||
<Button Click="Delete" Content="Delete" />
|
||||
</StackPanel>
|
||||
|
||||
<Border Grid.Row="1">
|
||||
<StackPanel>
|
||||
<TextBlock
|
||||
x:Name="tbMsg"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="14"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="{Binding MessageColor}"
|
||||
Text="{Binding Message}"
|
||||
Visibility="{Binding MessageVisibility}" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Action buttons at the bottom of the dialog -->
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
<Border
|
||||
Grid.Row="2"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
Margin="10"
|
||||
HorizontalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
Margin="0,0,10,0"
|
||||
Click="Save"
|
||||
Content="Save" />
|
||||
<Button Click="Cancel" Content="Cancel" />
|
||||
</StackPanel>
|
||||
Background="{DynamicResource PopupButtonAreaBGColor}"
|
||||
BorderBrush="{DynamicResource PopupButtonAreaBorderColor}"
|
||||
BorderThickness="0,1,0,0"
|
||||
CornerRadius="0 0 8 8">
|
||||
<StackPanel
|
||||
Margin="10"
|
||||
HorizontalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
Height="30"
|
||||
MinWidth="100"
|
||||
Margin="0,0,4,0"
|
||||
Click="Save"
|
||||
Content="{DynamicResource commonSave}"
|
||||
Style="{StaticResource AccentButtonStyle}" />
|
||||
<Button
|
||||
Height="30"
|
||||
MinWidth="100"
|
||||
Margin="4,0,4,0"
|
||||
Click="Reset"
|
||||
Content="{DynamicResource commonReset}" />
|
||||
<Button
|
||||
Height="30"
|
||||
MinWidth="100"
|
||||
Margin="4,0,4,0"
|
||||
Click="Delete"
|
||||
Content="{DynamicResource commonDelete}" />
|
||||
<Button
|
||||
Height="30"
|
||||
MinWidth="100"
|
||||
Margin="4,0,0,0"
|
||||
Click="Cancel"
|
||||
Content="{DynamicResource commonCancel}" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
</ui:ContentDialog>
|
||||
|
|
|
|||
|
|
@ -309,6 +309,8 @@
|
|||
<system:String x:Key="hotkeyIsNotUnavailable">Hotkey is unavailable, please select a new hotkey</system:String>
|
||||
<system:String x:Key="invalidPluginHotkey">Invalid plugin hotkey</system:String>
|
||||
<system:String x:Key="update">Update</system:String>
|
||||
<system:String x:Key="hotkeyUnavailable">Hotkey Unavailable</system:String>
|
||||
<system:String x:Key="hotkeyRegGuide">Press the keys you want to use for this function.</system:String>
|
||||
|
||||
<!-- Custom Query Shortcut Dialog -->
|
||||
<system:String x:Key="customeQueryShortcutTitle">Custom Query Shortcut</system:String>
|
||||
|
|
@ -318,8 +320,11 @@
|
|||
<system:String x:Key="duplicateShortcut">Shortcut already exists, please enter a new Shortcut or edit the existing one.</system:String>
|
||||
<system:String x:Key="emptyShortcut">Shortcut and/or its expansion is empty.</system:String>
|
||||
|
||||
<!-- Hotkey Control -->
|
||||
<system:String x:Key="hotkeyUnavailable">Hotkey Unavailable</system:String>
|
||||
<!-- Common Action-->
|
||||
<system:String x:Key="commonSave">Save</system:String>
|
||||
<system:String x:Key="commonCancel">Cancel</system:String>
|
||||
<system:String x:Key="commonReset">Reset</system:String>
|
||||
<system:String x:Key="commonDelete">Delete</system:String>
|
||||
|
||||
<!-- Crash Reporter -->
|
||||
<system:String x:Key="reportWindow_version">Version</system:String>
|
||||
|
|
|
|||
|
|
@ -2645,7 +2645,8 @@
|
|||
ChangeHotkey="{Binding SetTogglingHotkeyCommand}"
|
||||
DefaultHotkey="Alt+Space"
|
||||
Hotkey="{Binding Settings.Hotkey}"
|
||||
ValidateKeyGesture="True" />
|
||||
ValidateKeyGesture="True"
|
||||
WindowTitle="{DynamicResource flowlauncherHotkey}" />
|
||||
</cc:Card>
|
||||
</StackPanel>
|
||||
|
||||
|
|
@ -2657,8 +2658,8 @@
|
|||
<flowlauncher:HotkeyControl2
|
||||
DefaultHotkey="F1"
|
||||
Hotkey="{Binding Settings.PreviewHotkey}"
|
||||
WindowTitle="Preview hotkey"
|
||||
ValidateKeyGesture="False" />
|
||||
ValidateKeyGesture="False"
|
||||
WindowTitle="Preview hotkey" />
|
||||
</cc:Card>
|
||||
</StackPanel>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue