Flow.Launcher/Flow.Launcher/SettingWindow.xaml

273 lines
13 KiB
XML

<Window
x:Class="Flow.Launcher.SettingWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
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="http://schemas.modernwpf.com/2019"
xmlns:vm="clr-namespace:Flow.Launcher.ViewModel"
Title="{DynamicResource flowlauncher_settings}"
Width="{Binding SettingWindowWidth, Mode=TwoWay}"
Height="{Binding SettingWindowHeight, Mode=TwoWay}"
MinWidth="940"
MinHeight="600"
d:DataContext="{d:DesignInstance vm:SettingWindowViewModel}"
Closed="OnClosed"
FontFamily="{DynamicResource SettingWindowFont}"
Icon="Images\app.ico"
Left="{Binding SettingWindowLeft, Mode=TwoWay}"
Loaded="OnLoaded"
LocationChanged="Window_LocationChanged"
MouseDown="window_MouseDown"
ResizeMode="CanResize"
SnapsToDevicePixels="True"
StateChanged="Window_StateChanged"
Top="{Binding SettingWindowTop, Mode=TwoWay}"
UseLayoutRounding="True"
WindowStartupLocation="Manual"
mc:Ignorable="d">
<WindowChrome.WindowChrome>
<WindowChrome CaptionHeight="32" ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}" />
</WindowChrome.WindowChrome>
<Window.InputBindings>
<KeyBinding Key="Escape" Command="Close" />
</Window.InputBindings>
<Window.CommandBindings>
<CommandBinding Command="Close" Executed="OnCloseExecuted" />
</Window.CommandBindings>
<!-- New -->
<Grid>
<Border Style="{StaticResource WindowMainPanelStyle}">
<Grid Background="{DynamicResource Color01B}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="32" />
<RowDefinition />
</Grid.RowDefinitions>
<!-- TitleBar and Control -->
<Image
Grid.Row="0"
Grid.Column="0"
Width="16"
Height="16"
Margin="10 4 4 4"
RenderOptions.BitmapScalingMode="HighQuality"
Source="/Images/app.png" />
<TextBlock
Grid.Row="0"
Grid.Column="1"
Margin="4 0 0 0"
VerticalAlignment="Center"
FontSize="12"
Foreground="{DynamicResource Color05B}"
Text="{DynamicResource flowlauncher_settings}" />
<Button
Grid.Row="0"
Grid.Column="2"
Click="OnMinimizeButtonClick"
RenderOptions.EdgeMode="Aliased"
Style="{DynamicResource TitleBarButtonStyle}">
<Path
Width="46"
Height="32"
Data="M 18,15 H 28"
Stroke="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
StrokeThickness="1">
<Path.Style>
<Style TargetType="Path">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=IsActive, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" Value="False">
<Setter Property="Opacity" Value="0.5" />
</DataTrigger>
</Style.Triggers>
</Style>
</Path.Style>
</Path>
</Button>
<Button
Name="MaximizeButton"
Grid.Row="0"
Grid.Column="3"
Click="OnMaximizeRestoreButtonClick"
Style="{StaticResource TitleBarButtonStyle}">
<Path
Width="46"
Height="32"
Data="M 18.5,10.5 H 27.5 V 19.5 H 18.5 Z"
Stroke="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
StrokeThickness="1">
<Path.Style>
<Style TargetType="Path">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=IsActive, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" Value="False">
<Setter Property="Opacity" Value="0.5" />
</DataTrigger>
</Style.Triggers>
</Style>
</Path.Style>
</Path>
</Button>
<Button
Name="RestoreButton"
Grid.Row="0"
Grid.Column="3"
Click="OnMaximizeRestoreButtonClick"
Style="{StaticResource TitleBarButtonStyle}">
<Path
Width="46"
Height="32"
Data="M 18.5,12.5 H 25.5 V 19.5 H 18.5 Z M 20.5,12.5 V 10.5 H 27.5 V 17.5 H 25.5"
Stroke="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
StrokeThickness="1">
<Path.Style>
<Style TargetType="Path">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=IsActive, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" Value="False">
<Setter Property="Opacity" Value="0.5" />
</DataTrigger>
</Style.Triggers>
</Style>
</Path.Style>
</Path>
</Button>
<Button
Grid.Row="0"
Grid.Column="4"
Click="OnCloseButtonClick"
Style="{StaticResource TitleBarCloseButtonStyle}">
<Path
Width="46"
Height="32"
Data="M 18,11 27,20 M 18,20 27,11"
Stroke="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
StrokeThickness="1">
<Path.Style>
<Style TargetType="Path">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=IsActive, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" Value="False">
<Setter Property="Opacity" Value="0.5" />
</DataTrigger>
</Style.Triggers>
</Style>
</Path.Style>
</Path>
</Button>
<ui:NavigationView
x:Name="NavView"
Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="5"
Margin="0 0 0 0"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
AlwaysShowHeader="False"
Background="{DynamicResource Color01B}"
IsBackButtonVisible="Collapsed"
IsBackEnabled="False"
IsPaneToggleButtonVisible="False"
IsSettingsVisible="False"
IsTabStop="False"
Loaded="NavView_Loaded"
OpenPaneLength="240"
PaneDisplayMode="Left"
SelectionChanged="NavigationView_SelectionChanged">
<ui:NavigationView.HeaderTemplate>
<DataTemplate>
<TextBlock
Margin="-8 18 0 5"
VerticalAlignment="Center"
FontSize="30"
FontWeight="Medium"
Foreground="{DynamicResource Color05B}"
Text="{Binding}" />
</DataTemplate>
</ui:NavigationView.HeaderTemplate>
<ui:NavigationView.PaneCustomContent>
<Grid Margin="0 35 0 0" HorizontalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition Height="50" />
<RowDefinition Height="27" />
<RowDefinition Height="25" />
</Grid.RowDefinitions>
<Image
Grid.Row="0"
Width="50"
Height="50"
RenderOptions.BitmapScalingMode="HighQuality"
Source="images/app.png" />
<TextBlock
Grid.Row="1"
Margin="0 12 0 0"
Style="{StaticResource TabMenu}"
Text="Flow Launcher"
TextAlignment="Center" />
</Grid>
</ui:NavigationView.PaneCustomContent>
<ui:NavigationView.MenuItems>
<ui:NavigationViewItem x:Name="General" Content="{DynamicResource general}">
<ui:NavigationViewItem.Icon>
<ui:BitmapIcon ShowAsMonochrome="False" UriSource="/Images/settings.png" />
</ui:NavigationViewItem.Icon>
</ui:NavigationViewItem>
<ui:NavigationViewItem x:Name="Plugins" Content="{DynamicResource plugins}">
<ui:NavigationViewItem.Icon>
<ui:BitmapIcon ShowAsMonochrome="False" UriSource="/Images/plugins.png" />
</ui:NavigationViewItem.Icon>
</ui:NavigationViewItem>
<ui:NavigationViewItem
x:Name="PluginStore"
Content="{DynamicResource pluginStore}"
Tag="PluginStore">
<ui:NavigationViewItem.Icon>
<ui:BitmapIcon ShowAsMonochrome="False" UriSource="/Images/store.png" />
</ui:NavigationViewItem.Icon>
</ui:NavigationViewItem>
<ui:NavigationViewItem x:Name="Theme" Content="{DynamicResource appearance}">
<ui:NavigationViewItem.Icon>
<ui:BitmapIcon ShowAsMonochrome="False" UriSource="/Images/theme.png" />
</ui:NavigationViewItem.Icon>
</ui:NavigationViewItem>
<ui:NavigationViewItem x:Name="Hotkey" Content="{DynamicResource hotkeys}">
<ui:NavigationViewItem.Icon>
<ui:BitmapIcon ShowAsMonochrome="False" UriSource="/Images/keyboard.png" />
</ui:NavigationViewItem.Icon>
</ui:NavigationViewItem>
<ui:NavigationViewItem x:Name="Proxy" Content="{DynamicResource proxy}">
<ui:NavigationViewItem.Icon>
<ui:BitmapIcon ShowAsMonochrome="False" UriSource="/Images/proxy.png" />
</ui:NavigationViewItem.Icon>
</ui:NavigationViewItem>
<ui:NavigationViewItem x:Name="About" Content="{DynamicResource about}">
<ui:NavigationViewItem.Icon>
<ui:BitmapIcon ShowAsMonochrome="False" UriSource="/Images/info.png" />
</ui:NavigationViewItem.Icon>
</ui:NavigationViewItem>
</ui:NavigationView.MenuItems>
<Grid>
<ui:Frame x:Name="ContentFrame" Margin="0" />
</Grid>
</ui:NavigationView>
</Grid>
</Border>
</Grid>
</Window>