mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Adjust Style
This commit is contained in:
parent
9fd177443a
commit
e79fee76df
1 changed files with 134 additions and 91 deletions
|
|
@ -8,7 +8,6 @@
|
||||||
xmlns:ui="http://schemas.modernwpf.com/2019"
|
xmlns:ui="http://schemas.modernwpf.com/2019"
|
||||||
xmlns:vm="clr-namespace:Flow.Launcher.ViewModel"
|
xmlns:vm="clr-namespace:Flow.Launcher.ViewModel"
|
||||||
d:DataContext="{d:DesignInstance vm:HotkeyControlViewModel}"
|
d:DataContext="{d:DesignInstance vm:HotkeyControlViewModel}"
|
||||||
d:DesignWidth="300"
|
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Popup
|
<Popup
|
||||||
|
|
@ -40,59 +39,72 @@
|
||||||
Visibility="Visible" />
|
Visibility="Visible" />
|
||||||
</Border>
|
</Border>
|
||||||
</Popup>
|
</Popup>
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Border
|
||||||
|
x:Name="MenuBorder"
|
||||||
|
Grid.Column="0"
|
||||||
|
Margin="0,0,5,0"
|
||||||
|
Padding="5,0,5,0"
|
||||||
|
Background="{DynamicResource Color12B}"
|
||||||
|
BorderBrush="{DynamicResource ButtonInsideBorder}"
|
||||||
|
BorderThickness="1"
|
||||||
|
CornerRadius="5">
|
||||||
|
<Border.Style>
|
||||||
|
<Style TargetType="{x:Type Border}">
|
||||||
|
<Setter Property="Visibility" Value="Collapsed" />
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding ElementName=HotkeyBtn, Path=IsChecked}" Value="True">
|
||||||
|
<Setter Property="Visibility" Value="Visible" />
|
||||||
|
</DataTrigger>
|
||||||
|
<DataTrigger Binding="{Binding ElementName=HotkeyBtn, Path=IsChecked}" Value="False">
|
||||||
|
<Setter Property="Visibility" Value="Collapsed" />
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</Border.Style>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<Button Margin="2" Command="{Binding ResetToDefaultCommand}">
|
||||||
|
<Button.Content>
|
||||||
|
<ui:FontIcon FontSize="13" Glyph="" />
|
||||||
|
</Button.Content>
|
||||||
|
</Button>
|
||||||
|
<Button Margin="2" Command="{Binding DeleteCommand}">
|
||||||
|
<Button.Content>
|
||||||
|
<ui:FontIcon FontSize="13" Glyph="" />
|
||||||
|
</Button.Content>
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
Margin="2"
|
||||||
|
CacheMode="{Binding StopRecordingCommand}"
|
||||||
|
Foreground="red">
|
||||||
|
<Button.Content>
|
||||||
|
<ui:FontIcon FontSize="13" Glyph="" />
|
||||||
|
</Button.Content>
|
||||||
|
</Button>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
|
||||||
<RadioButton
|
<RadioButton
|
||||||
x:Name="HotkeyBtn"
|
x:Name="HotkeyBtn"
|
||||||
Command="{Binding StartRecordingCommand}"
|
Grid.Column="1"
|
||||||
FontSize="13"
|
Width="Auto"
|
||||||
FontWeight="Bold"
|
Command="{Binding StartRecordingCommand}"
|
||||||
Foreground="{DynamicResource Color01B}"
|
FontSize="13"
|
||||||
GroupName="HotkeyReg"
|
FontWeight="Bold"
|
||||||
IsChecked="{Binding Recording}"
|
Foreground="{DynamicResource Color01B}"
|
||||||
KeyboardNavigation.TabNavigation="Continue"
|
GroupName="HotkeyReg"
|
||||||
PreviewKeyDown="OnPreviewKeyDown"
|
IsChecked="{Binding Recording}"
|
||||||
Style="{StaticResource {x:Type ToggleButton}}">
|
KeyboardNavigation.TabNavigation="Continue"
|
||||||
<RadioButton.Template>
|
PreviewKeyDown="OnPreviewKeyDown"
|
||||||
<ControlTemplate TargetType="RadioButton">
|
Style="{StaticResource {x:Type ToggleButton}}">
|
||||||
<Grid>
|
<RadioButton.Template>
|
||||||
<Grid.ColumnDefinitions>
|
<ControlTemplate TargetType="RadioButton">
|
||||||
<ColumnDefinition />
|
|
||||||
<ColumnDefinition />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Border
|
|
||||||
x:Name="MenuBorder"
|
|
||||||
Grid.Column="0"
|
|
||||||
Margin="0,0,5,0"
|
|
||||||
Padding="5,0,5,0"
|
|
||||||
Background="{DynamicResource Color12B}"
|
|
||||||
BorderBrush="{DynamicResource ButtonInsideBorder}"
|
|
||||||
BorderThickness="1"
|
|
||||||
CornerRadius="5">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<Button Margin="2" Command="{Binding ResetToDefaultCommand}">
|
|
||||||
<Button.Content>
|
|
||||||
<ui:FontIcon FontSize="13" Glyph="" />
|
|
||||||
</Button.Content>
|
|
||||||
</Button>
|
|
||||||
<Button Margin="2" Command="{Binding DeleteCommand}">
|
|
||||||
<Button.Content>
|
|
||||||
<ui:FontIcon FontSize="13" Glyph="" />
|
|
||||||
</Button.Content>
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
Margin="2"
|
|
||||||
CacheMode="{Binding StopRecordingCommand}"
|
|
||||||
Foreground="red">
|
|
||||||
<Button.Content>
|
|
||||||
<ui:FontIcon FontSize="13" Glyph="" />
|
|
||||||
</Button.Content>
|
|
||||||
</Button>
|
|
||||||
</StackPanel>
|
|
||||||
</Border>
|
|
||||||
|
|
||||||
<Border
|
<Border
|
||||||
x:Name="ButtonBorder"
|
x:Name="ButtonBorder"
|
||||||
Grid.Column="1"
|
|
||||||
Padding="5,0,5,0"
|
Padding="5,0,5,0"
|
||||||
Background="{DynamicResource Color12B}"
|
Background="{DynamicResource Color12B}"
|
||||||
BorderBrush="{DynamicResource ButtonInsideBorder}"
|
BorderBrush="{DynamicResource ButtonInsideBorder}"
|
||||||
|
|
@ -100,45 +112,76 @@
|
||||||
CornerRadius="5">
|
CornerRadius="5">
|
||||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
<ControlTemplate.Triggers>
|
||||||
<ControlTemplate.Triggers>
|
<MultiTrigger>
|
||||||
<Trigger Property="IsMouseOver" Value="True">
|
<MultiTrigger.Conditions>
|
||||||
<Setter TargetName="ButtonBorder" Property="Background" Value="{DynamicResource CustomContextHover}" />
|
<Condition Property="IsMouseOver" Value="True" />
|
||||||
</Trigger>
|
<Condition Property="IsChecked" Value="True" />
|
||||||
<Trigger Property="IsPressed" Value="True">
|
<Condition Property="IsPressed" Value="True" />
|
||||||
<Setter TargetName="ButtonBorder" Property="Background" Value="{DynamicResource ButtonMousePressed}" />
|
</MultiTrigger.Conditions>
|
||||||
<Setter TargetName="ButtonBorder" Property="BorderBrush" Value="{DynamicResource ButtonMousePressedInsideBorder}" />
|
<Setter TargetName="ButtonBorder" Property="Background" Value="{DynamicResource ButtonMousePressed}" />
|
||||||
</Trigger>
|
<Setter TargetName="ButtonBorder" Property="BorderBrush" Value="{DynamicResource ButtonMousePressedInsideBorder}" />
|
||||||
<Trigger Property="IsChecked" Value="True">
|
</MultiTrigger>
|
||||||
<Setter TargetName="MenuBorder" Property="Visibility" Value="Visible" />
|
<MultiTrigger>
|
||||||
</Trigger>
|
<MultiTrigger.Conditions>
|
||||||
<Trigger Property="IsChecked" Value="False">
|
<Condition Property="IsMouseOver" Value="True" />
|
||||||
<Setter TargetName="MenuBorder" Property="Visibility" Value="Collapsed" />
|
<Condition Property="IsChecked" Value="False" />
|
||||||
</Trigger>
|
</MultiTrigger.Conditions>
|
||||||
</ControlTemplate.Triggers>
|
<Setter TargetName="ButtonBorder" Property="Background" Value="{DynamicResource CustomContextHover}" />
|
||||||
</ControlTemplate>
|
</MultiTrigger>
|
||||||
</RadioButton.Template>
|
<MultiTrigger>
|
||||||
<ToggleButton.Content>
|
<MultiTrigger.Conditions>
|
||||||
<ItemsControl ItemsSource="{Binding Path=KeysToDisplay}">
|
<Condition Property="IsChecked" Value="True" />
|
||||||
<ItemsControl.ItemsPanel>
|
</MultiTrigger.Conditions>
|
||||||
<ItemsPanelTemplate>
|
<Setter TargetName="ButtonBorder" Property="Background" Value="{DynamicResource ButtonMousePressed}" />
|
||||||
<StackPanel Orientation="Horizontal" />
|
<Setter TargetName="ButtonBorder" Property="BorderBrush" Value="{DynamicResource CustomContextHover}" />
|
||||||
</ItemsPanelTemplate>
|
</MultiTrigger>
|
||||||
</ItemsControl.ItemsPanel>
|
<MultiTrigger>
|
||||||
<ItemsControl.ItemTemplate>
|
<MultiTrigger.Conditions>
|
||||||
<DataTemplate>
|
<Condition Property="IsPressed" Value="True" />
|
||||||
<Border
|
<Condition Property="IsChecked" Value="True" />
|
||||||
Margin="2,5,2,5"
|
</MultiTrigger.Conditions>
|
||||||
Padding="10,5,10,5"
|
<Setter TargetName="ButtonBorder" Property="Background" Value="{DynamicResource ButtonMousePressed}" />
|
||||||
Background="{DynamicResource SystemAccentColorLight2Brush}"
|
<Setter TargetName="ButtonBorder" Property="BorderBrush" Value="{DynamicResource CustomContextHover}" />
|
||||||
BorderThickness="1"
|
</MultiTrigger>
|
||||||
CornerRadius="5">
|
</ControlTemplate.Triggers>
|
||||||
<TextBlock Text="{Binding}" />
|
<!--<ControlTemplate.Triggers>
|
||||||
</Border>
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
</DataTemplate>
|
<Setter TargetName="ButtonBorder" Property="Background" Value="{DynamicResource CustomContextHover}" />
|
||||||
</ItemsControl.ItemTemplate>
|
</Trigger>
|
||||||
</ItemsControl>
|
<Trigger Property="IsChecked" Value="True">
|
||||||
</ToggleButton.Content>
|
<Setter TargetName="ButtonBorder" Property="Background" Value="{DynamicResource ButtonMousePressed}" />
|
||||||
</RadioButton>
|
<Setter TargetName="ButtonBorder" Property="BorderBrush" Value="{DynamicResource CustomContextHover}" />
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsPressed" Value="True">
|
||||||
|
<Setter TargetName="ButtonBorder" Property="Background" Value="{DynamicResource ButtonMousePressed}" />
|
||||||
|
<Setter TargetName="ButtonBorder" Property="BorderBrush" Value="{DynamicResource ButtonMousePressedInsideBorder}" />
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>-->
|
||||||
|
</ControlTemplate>
|
||||||
|
</RadioButton.Template>
|
||||||
|
<ToggleButton.Content>
|
||||||
|
<ItemsControl ItemsSource="{Binding Path=KeysToDisplay}">
|
||||||
|
<ItemsControl.ItemsPanel>
|
||||||
|
<ItemsPanelTemplate>
|
||||||
|
<StackPanel Orientation="Horizontal" />
|
||||||
|
</ItemsPanelTemplate>
|
||||||
|
</ItemsControl.ItemsPanel>
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Border
|
||||||
|
Margin="2,5,2,5"
|
||||||
|
Padding="10,5,10,5"
|
||||||
|
Background="{DynamicResource SystemAccentColorLight2Brush}"
|
||||||
|
BorderThickness="1"
|
||||||
|
CornerRadius="5">
|
||||||
|
<TextBlock Text="{Binding}" />
|
||||||
|
</Border>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>
|
||||||
|
</ToggleButton.Content>
|
||||||
|
</RadioButton>
|
||||||
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
Loading…
Reference in a new issue