mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Cleanup SettingsPaneTheme, use custom components in it
This commit is contained in:
parent
1ea00de931
commit
1c1979ee6f
2 changed files with 383 additions and 649 deletions
|
|
@ -9,6 +9,7 @@
|
||||||
xmlns:ui="http://schemas.modernwpf.com/2019"
|
xmlns:ui="http://schemas.modernwpf.com/2019"
|
||||||
xmlns:userSettings="clr-namespace:Flow.Launcher.Infrastructure.UserSettings;assembly=Flow.Launcher.Infrastructure"
|
xmlns:userSettings="clr-namespace:Flow.Launcher.Infrastructure.UserSettings;assembly=Flow.Launcher.Infrastructure"
|
||||||
xmlns:viewModels="clr-namespace:Flow.Launcher.SettingPages.ViewModels"
|
xmlns:viewModels="clr-namespace:Flow.Launcher.SettingPages.ViewModels"
|
||||||
|
xmlns:ext="clr-namespace:Flow.Launcher.Resources.MarkupExtensions"
|
||||||
Title="Theme"
|
Title="Theme"
|
||||||
d:DataContext="{d:DesignInstance viewModels:SettingsPaneThemeViewModel}"
|
d:DataContext="{d:DesignInstance viewModels:SettingsPaneThemeViewModel}"
|
||||||
d:DesignHeight="450"
|
d:DesignHeight="450"
|
||||||
|
|
@ -24,33 +25,27 @@
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
</ui:Page.Resources>
|
</ui:Page.Resources>
|
||||||
<ScrollViewer
|
<ScrollViewer
|
||||||
Margin="0,0,0,0"
|
Padding="6 0 24 0"
|
||||||
Padding="6,0,24,0"
|
|
||||||
CanContentScroll="True"
|
CanContentScroll="True"
|
||||||
FontSize="14"
|
FontSize="14"
|
||||||
VirtualizingStackPanel.IsVirtualizing="True"
|
VirtualizingStackPanel.IsVirtualizing="True"
|
||||||
VirtualizingStackPanel.ScrollUnit="Pixel">
|
VirtualizingStackPanel.ScrollUnit="Pixel">
|
||||||
<Grid Margin="0,0,0,0">
|
<StackPanel>
|
||||||
<Grid.RowDefinitions>
|
<!-- Page title -->
|
||||||
<RowDefinition Height="0" />
|
|
||||||
<RowDefinition Height="350" />
|
|
||||||
<RowDefinition />
|
|
||||||
<RowDefinition />
|
|
||||||
<RowDefinition Height="*" />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Border Grid.Row="0" Padding="5,18,0,0">
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="0,5,0,5"
|
Margin="5 23 0 5"
|
||||||
FontSize="30"
|
FontSize="30"
|
||||||
Style="{StaticResource PageTitle}"
|
Style="{StaticResource PageTitle}"
|
||||||
Text="{DynamicResource appearance}"
|
Text="{DynamicResource appearance}"
|
||||||
TextAlignment="left" />
|
TextAlignment="left"
|
||||||
</Border>
|
Visibility="Collapsed" />
|
||||||
|
|
||||||
|
<!-- Theme preview -->
|
||||||
<StackPanel
|
<StackPanel
|
||||||
Grid.Row="1"
|
Height="350"
|
||||||
Margin="0"
|
Margin="0"
|
||||||
Background="{Binding PreviewBackground}">
|
Background="{Binding PreviewBackground}"
|
||||||
|
IsHitTestVisible="False">
|
||||||
<StackPanel
|
<StackPanel
|
||||||
Margin="0,30,0,0"
|
Margin="0,30,0,0"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
|
|
@ -72,29 +67,29 @@
|
||||||
</Border.Clip>
|
</Border.Clip>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition />
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Border Grid.Row="0">
|
<!-- Query TextBox -->
|
||||||
<TextBox
|
<TextBox
|
||||||
x:Name="QueryTextBox"
|
x:Name="QueryTextBox"
|
||||||
IsHitTestVisible="False"
|
Grid.Row="0"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
Style="{DynamicResource QueryBoxStyle}"
|
Style="{DynamicResource QueryBoxStyle}"
|
||||||
Text="{DynamicResource hiThere}" />
|
Text="{DynamicResource hiThere}" />
|
||||||
</Border>
|
<!-- Clock panel -->
|
||||||
<StackPanel
|
<StackPanel
|
||||||
x:Name="ClockPanel"
|
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
IsHitTestVisible="False"
|
|
||||||
Style="{DynamicResource ClockPanel}"
|
Style="{DynamicResource ClockPanel}"
|
||||||
Visibility="Visible">
|
Visibility="Visible">
|
||||||
|
<!-- Clock TextBox -->
|
||||||
<TextBlock
|
<TextBlock
|
||||||
x:Name="ClockBox"
|
x:Name="ClockBox"
|
||||||
Style="{DynamicResource ClockBox}"
|
Style="{DynamicResource ClockBox}"
|
||||||
Text="{Binding ClockText}"
|
Text="{Binding ClockText}"
|
||||||
Visibility="{Binding Settings.UseClock, Converter={StaticResource BoolToVisibilityConverter}}" />
|
Visibility="{Binding Settings.UseClock, Converter={StaticResource BoolToVisibilityConverter}}" />
|
||||||
|
<!-- Date TextBox -->
|
||||||
<TextBlock
|
<TextBlock
|
||||||
x:Name="DateBox"
|
x:Name="DateBox"
|
||||||
Style="{DynamicResource DateBox}"
|
Style="{DynamicResource DateBox}"
|
||||||
|
|
@ -109,20 +104,17 @@
|
||||||
Style="{DynamicResource SearchIconStyle}" />
|
Style="{DynamicResource SearchIconStyle}" />
|
||||||
</Canvas>
|
</Canvas>
|
||||||
|
|
||||||
<Border Grid.Row="1" Margin="0,0,0,0">
|
|
||||||
<Rectangle
|
<Rectangle
|
||||||
|
Grid.Row="1"
|
||||||
Width="Auto"
|
Width="Auto"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
Style="{DynamicResource SeparatorStyle}"
|
Style="{DynamicResource SeparatorStyle}"
|
||||||
Visibility="Visible" />
|
Visibility="Visible" />
|
||||||
</Border>
|
|
||||||
|
|
||||||
<ContentControl Grid.Row="2">
|
|
||||||
<flowlauncher:ResultListBox
|
<flowlauncher:ResultListBox
|
||||||
|
Grid.Row="2"
|
||||||
DataContext="{Binding PreviewResults, Mode=OneTime}"
|
DataContext="{Binding PreviewResults, Mode=OneTime}"
|
||||||
IsHitTestVisible="False"
|
|
||||||
Visibility="Visible" />
|
Visibility="Visible" />
|
||||||
</ContentControl>
|
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
@ -130,19 +122,19 @@
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Grid.Row="2" VerticalAlignment="Top">
|
<!-- Drop shadow effect -->
|
||||||
|
|
||||||
<cc:Card
|
<cc:Card
|
||||||
Title="{DynamicResource queryWindowShadowEffect}"
|
|
||||||
Margin="0,4,0,0"
|
|
||||||
Icon=""
|
Icon=""
|
||||||
Sub="{DynamicResource shadowEffectCPUUsage}">
|
Title="{DynamicResource queryWindowShadowEffect}"
|
||||||
|
Sub="{DynamicResource shadowEffectCPUUsage}"
|
||||||
|
Margin="0 4 0 0">
|
||||||
<ui:ToggleSwitch
|
<ui:ToggleSwitch
|
||||||
IsOn="{Binding DropShadowEffect, Mode=TwoWay}"
|
IsOn="{Binding DropShadowEffect}"
|
||||||
OffContent="{DynamicResource disable}"
|
OffContent="{DynamicResource disable}"
|
||||||
OnContent="{DynamicResource enable}" />
|
OnContent="{DynamicResource enable}" />
|
||||||
</cc:Card>
|
</cc:Card>
|
||||||
|
|
||||||
|
<!-- Window width size -->
|
||||||
<cc:Card
|
<cc:Card
|
||||||
Title="{DynamicResource windowWidthSize}"
|
Title="{DynamicResource windowWidthSize}"
|
||||||
Icon=""
|
Icon=""
|
||||||
|
|
@ -150,10 +142,10 @@
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Width="Auto"
|
Width="Auto"
|
||||||
Margin="0,0,8,2"
|
Margin="0 0 8 2"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Foreground="{DynamicResource Color05B}"
|
Foreground="{DynamicResource Color05B}"
|
||||||
Text="{Binding WindowWidthSize, Mode=TwoWay}"
|
Text="{Binding WindowWidthSize}"
|
||||||
TextAlignment="Right" />
|
TextAlignment="Right" />
|
||||||
<Slider
|
<Slider
|
||||||
Width="250"
|
Width="250"
|
||||||
|
|
@ -163,15 +155,14 @@
|
||||||
Maximum="1920"
|
Maximum="1920"
|
||||||
Minimum="400"
|
Minimum="400"
|
||||||
TickFrequency="10"
|
TickFrequency="10"
|
||||||
Value="{Binding WindowWidthSize, Mode=TwoWay}" />
|
Value="{Binding WindowWidthSize}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</cc:Card>
|
</cc:Card>
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<StackPanel Grid.Row="3">
|
<!-- Theme -->
|
||||||
<Border
|
<Border
|
||||||
Height="64"
|
Height="64"
|
||||||
Margin="0,8,0,0"
|
Margin="0 8 0 0"
|
||||||
CornerRadius="5 5 0 0"
|
CornerRadius="5 5 0 0"
|
||||||
Style="{DynamicResource SettingGroupBox}">
|
Style="{DynamicResource SettingGroupBox}">
|
||||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||||
|
|
@ -183,15 +174,16 @@
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
</ItemsControl>
|
</ItemsControl>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<Border
|
<Border
|
||||||
Margin="0,0,0,0"
|
Margin="0"
|
||||||
Padding="0"
|
Padding="0"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
BorderThickness="1,0,1,1"
|
BorderThickness="1 0 1 1"
|
||||||
CornerRadius="0 0 5 5"
|
CornerRadius="0 0 5 5"
|
||||||
Style="{DynamicResource SettingGroupBox}">
|
Style="{DynamicResource SettingGroupBox}">
|
||||||
<ListBox
|
<ListBox
|
||||||
Margin="12,12,12,12"
|
Margin="12"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
HorizontalContentAlignment="Center"
|
HorizontalContentAlignment="Center"
|
||||||
ui:ScrollViewerHelper.AutoHideScrollBars="True"
|
ui:ScrollViewerHelper.AutoHideScrollBars="True"
|
||||||
|
|
@ -207,7 +199,7 @@
|
||||||
Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
|
Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
|
||||||
<Setter Property="VerticalContentAlignment"
|
<Setter Property="VerticalContentAlignment"
|
||||||
Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
|
Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
|
||||||
<Setter Property="Padding" Value="0,0,0,0" />
|
<Setter Property="Padding" Value="0" />
|
||||||
<Setter Property="Margin" Value="4" />
|
<Setter Property="Margin" Value="4" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
|
|
@ -217,13 +209,13 @@
|
||||||
Padding="{TemplateBinding Padding}"
|
Padding="{TemplateBinding Padding}"
|
||||||
Background="{DynamicResource Color12B}"
|
Background="{DynamicResource Color12B}"
|
||||||
BorderBrush="{DynamicResource Color03B}"
|
BorderBrush="{DynamicResource Color03B}"
|
||||||
BorderThickness="1,1,1,0"
|
BorderThickness="1 1 1 0"
|
||||||
CornerRadius="4"
|
CornerRadius="4"
|
||||||
SnapsToDevicePixels="true">
|
SnapsToDevicePixels="true">
|
||||||
<Border
|
<Border
|
||||||
x:Name="Bd2"
|
x:Name="Bd2"
|
||||||
BorderBrush="{DynamicResource Color14B}"
|
BorderBrush="{DynamicResource Color14B}"
|
||||||
BorderThickness="0,0,0,2"
|
BorderThickness="0 0 0 2"
|
||||||
CornerRadius="4">
|
CornerRadius="4">
|
||||||
<ContentPresenter
|
<ContentPresenter
|
||||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||||
|
|
@ -260,11 +252,11 @@
|
||||||
<Grid
|
<Grid
|
||||||
Width="Auto"
|
Width="Auto"
|
||||||
Height="34"
|
Height="34"
|
||||||
Margin="0,0,0,0">
|
Margin="0">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
x:Name="ThemeName"
|
x:Name="ThemeName"
|
||||||
Margin="0"
|
Margin="0"
|
||||||
Padding="14,12,14,12"
|
Padding="14 12"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Focusable="True"
|
Focusable="True"
|
||||||
|
|
@ -282,82 +274,34 @@
|
||||||
</ListBox>
|
</ListBox>
|
||||||
|
|
||||||
</Border>
|
</Border>
|
||||||
<Border>
|
|
||||||
<TextBlock
|
<cc:HyperLink
|
||||||
Margin="10"
|
Margin="10"
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
DockPanel.Dock="Top">
|
Uri="{Binding LinkThemeGallery}"
|
||||||
<Hyperlink NavigateUri="{Binding LinkThemeGallery, Mode=OneWay}"
|
Text="{DynamicResource browserMoreThemes}" />
|
||||||
RequestNavigate="Hyperlink_OnRequestNavigate">
|
|
||||||
<Run Text="{DynamicResource browserMoreThemes}" />
|
|
||||||
</Hyperlink>
|
|
||||||
</TextBlock>
|
|
||||||
</Border>
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
|
|
||||||
<StackPanel
|
<!-- Fonts and icons -->
|
||||||
Grid.Row="4"
|
<cc:CardGroup Margin="0 30 0 0">
|
||||||
Margin="0,0,0,10"
|
<cc:Card Icon="" Title="{DynamicResource useGlyphUI}"
|
||||||
Orientation="Vertical">
|
Sub="{DynamicResource useGlyphUIEffect}">
|
||||||
|
|
||||||
<Border
|
|
||||||
Margin="0,30,0,0"
|
|
||||||
Padding="0"
|
|
||||||
Style="{DynamicResource SettingGroupBox}">
|
|
||||||
<StackPanel Orientation="Vertical">
|
|
||||||
<Border
|
|
||||||
Margin="0"
|
|
||||||
BorderThickness="0"
|
|
||||||
Style="{DynamicResource SettingGroupBox}">
|
|
||||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
|
||||||
<StackPanel Style="{StaticResource TextPanel}">
|
|
||||||
<TextBlock Style="{DynamicResource SettingTitleLabel}"
|
|
||||||
Text="{DynamicResource useGlyphUI}" />
|
|
||||||
<TextBlock Style="{DynamicResource SettingSubTitleLabel}"
|
|
||||||
Text="{DynamicResource useGlyphUIEffect}" />
|
|
||||||
</StackPanel>
|
|
||||||
<ui:ToggleSwitch
|
<ui:ToggleSwitch
|
||||||
Grid.Row="0"
|
IsOn="{Binding UseGlyphIcons}"
|
||||||
Grid.Column="2"
|
OffContent="{DynamicResource disable}"
|
||||||
Margin="0,0,18,0"
|
OnContent="{DynamicResource enable}" />
|
||||||
IsOn="{Binding UseGlyphIcons, Mode=TwoWay}" />
|
</cc:Card>
|
||||||
<TextBlock Style="{StaticResource Glyph}">
|
|
||||||

|
<cc:Card Icon="" Title="{DynamicResource queryBoxFont}">
|
||||||
</TextBlock>
|
<StackPanel Orientation="Horizontal">
|
||||||
</ItemsControl>
|
|
||||||
</Border>
|
|
||||||
<Separator
|
|
||||||
Width="Auto"
|
|
||||||
BorderThickness="1"
|
|
||||||
Style="{StaticResource SettingSeparatorStyle}" />
|
|
||||||
<Border
|
|
||||||
Margin="0"
|
|
||||||
BorderThickness="0"
|
|
||||||
Style="{DynamicResource SettingGroupBox}">
|
|
||||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
|
||||||
<TextBlock
|
|
||||||
Grid.Column="1"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Style="{DynamicResource SettingTitleLabel}"
|
|
||||||
Text="{DynamicResource queryBoxFont}" />
|
|
||||||
<StackPanel
|
|
||||||
Grid.Column="2"
|
|
||||||
Margin="0,0,20,0"
|
|
||||||
Orientation="Horizontal">
|
|
||||||
<ComboBox
|
<ComboBox
|
||||||
Width="180"
|
Width="180"
|
||||||
Margin="20,0,0,0"
|
|
||||||
HorizontalAlignment="Left"
|
|
||||||
VerticalAlignment="Top"
|
|
||||||
IsSynchronizedWithCurrentItem="False"
|
IsSynchronizedWithCurrentItem="False"
|
||||||
ItemsSource="{Binding Source={StaticResource SortedFonts}}"
|
ItemsSource="{Binding Source={StaticResource SortedFonts}}"
|
||||||
SelectedItem="{Binding SelectedQueryBoxFont}" />
|
SelectedItem="{Binding SelectedQueryBoxFont}" />
|
||||||
<ComboBox
|
<ComboBox
|
||||||
Width="130"
|
Width="130"
|
||||||
Margin="10,0,0,0"
|
Margin="10 0 0 0"
|
||||||
HorizontalAlignment="Left"
|
|
||||||
VerticalAlignment="Top"
|
|
||||||
ItemsSource="{Binding SelectedQueryBoxFont.FamilyTypefaces}"
|
ItemsSource="{Binding SelectedQueryBoxFont.FamilyTypefaces}"
|
||||||
SelectedItem="{Binding SelectedQueryBoxFontFaces}">
|
SelectedItem="{Binding SelectedQueryBoxFontFaces}">
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
|
|
@ -373,42 +317,18 @@
|
||||||
</ComboBox.ItemTemplate>
|
</ComboBox.ItemTemplate>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<TextBlock Style="{StaticResource Glyph}">
|
</cc:Card>
|
||||||

|
|
||||||
</TextBlock>
|
<cc:Card Icon="" Title="{DynamicResource resultItemFont}">
|
||||||
</ItemsControl>
|
<StackPanel Orientation="Horizontal">
|
||||||
</Border>
|
|
||||||
<Separator
|
|
||||||
Width="Auto"
|
|
||||||
BorderThickness="1"
|
|
||||||
Style="{StaticResource SettingSeparatorStyle}" />
|
|
||||||
<Border
|
|
||||||
Margin="0"
|
|
||||||
BorderThickness="0"
|
|
||||||
Style="{DynamicResource SettingGroupBox}">
|
|
||||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
|
||||||
<TextBlock
|
|
||||||
Grid.Column="1"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Style="{DynamicResource SettingTitleLabel}"
|
|
||||||
Text="{DynamicResource resultItemFont}" />
|
|
||||||
<StackPanel
|
|
||||||
Grid.Column="2"
|
|
||||||
Margin="0,0,20,0"
|
|
||||||
Orientation="Horizontal">
|
|
||||||
<ComboBox
|
<ComboBox
|
||||||
Width="180"
|
Width="180"
|
||||||
Margin="20,-2,0,0"
|
|
||||||
HorizontalAlignment="Left"
|
|
||||||
VerticalAlignment="Top"
|
|
||||||
IsSynchronizedWithCurrentItem="False"
|
IsSynchronizedWithCurrentItem="False"
|
||||||
ItemsSource="{Binding Source={StaticResource SortedFonts}}"
|
ItemsSource="{Binding Source={StaticResource SortedFonts}}"
|
||||||
SelectedItem="{Binding SelectedResultFont}" />
|
SelectedItem="{Binding SelectedResultFont}" />
|
||||||
<ComboBox
|
<ComboBox
|
||||||
Width="130"
|
Width="130"
|
||||||
Margin="10,-2,0,0"
|
Margin="10 0 0 0"
|
||||||
HorizontalAlignment="Left"
|
|
||||||
VerticalAlignment="Top"
|
|
||||||
ItemsSource="{Binding SelectedResultFont.FamilyTypefaces}"
|
ItemsSource="{Binding SelectedResultFont.FamilyTypefaces}"
|
||||||
SelectedItem="{Binding SelectedResultFontFaces}">
|
SelectedItem="{Binding SelectedResultFontFaces}">
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
|
|
@ -424,328 +344,148 @@
|
||||||
</ComboBox.ItemTemplate>
|
</ComboBox.ItemTemplate>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<TextBlock Style="{StaticResource Glyph}">
|
</cc:Card>
|
||||||

|
</cc:CardGroup>
|
||||||
</TextBlock>
|
|
||||||
</ItemsControl>
|
|
||||||
</Border>
|
|
||||||
</StackPanel>
|
|
||||||
</Border>
|
|
||||||
|
|
||||||
<StackPanel>
|
<!-- Time and date -->
|
||||||
|
<cc:CardGroup Margin="0 24 0 0">
|
||||||
<Border
|
<cc:Card Icon="" Title="{DynamicResource Clock}">
|
||||||
Margin="0,24,0,12"
|
<StackPanel Orientation="Horizontal">
|
||||||
Padding="0"
|
|
||||||
Style="{DynamicResource SettingGroupBox}">
|
|
||||||
<StackPanel Orientation="Vertical">
|
|
||||||
<Border
|
|
||||||
Margin="0"
|
|
||||||
BorderThickness="0"
|
|
||||||
Style="{DynamicResource SettingGroupBox}">
|
|
||||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
|
||||||
<StackPanel Style="{StaticResource TextPanel}">
|
|
||||||
<TextBlock Style="{DynamicResource SettingTitleLabel}"
|
|
||||||
Text="{DynamicResource Clock}" />
|
|
||||||
</StackPanel>
|
|
||||||
<StackPanel
|
|
||||||
Grid.Row="0"
|
|
||||||
Grid.Column="2"
|
|
||||||
Orientation="Horizontal">
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="0,0,10,0"
|
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
FontSize="14"
|
FontSize="14"
|
||||||
Foreground="{DynamicResource Color04B}"
|
Foreground="{DynamicResource Color04B}"
|
||||||
Text="{Binding ClockText}" />
|
Text="{Binding ClockText}" />
|
||||||
<ComboBox
|
<ComboBox
|
||||||
MinWidth="180"
|
MinWidth="180"
|
||||||
Margin="0,0,18,0"
|
Margin="10 0 18 0"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
FontSize="14"
|
FontSize="14"
|
||||||
ItemsSource="{Binding TimeFormatList}"
|
ItemsSource="{Binding TimeFormatList}"
|
||||||
SelectedItem="{Binding TimeFormat}" />
|
SelectedItem="{Binding TimeFormat}" />
|
||||||
<ui:ToggleSwitch
|
<ui:ToggleSwitch
|
||||||
Margin="0,0,18,0"
|
IsOn="{Binding UseClock}"
|
||||||
IsOn="{Binding UseClock, Mode=TwoWay}"
|
|
||||||
OffContent="{DynamicResource disable}"
|
OffContent="{DynamicResource disable}"
|
||||||
OnContent="{DynamicResource enable}" />
|
OnContent="{DynamicResource enable}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<TextBlock Style="{StaticResource Glyph}">
|
</cc:Card>
|
||||||

|
|
||||||
</TextBlock>
|
<cc:Card Icon="" Title="{DynamicResource Date}">
|
||||||
</ItemsControl>
|
<StackPanel Orientation="Horizontal">
|
||||||
</Border>
|
|
||||||
<Separator
|
|
||||||
Width="Auto"
|
|
||||||
BorderThickness="1"
|
|
||||||
Style="{StaticResource SettingSeparatorStyle}" />
|
|
||||||
<Border
|
|
||||||
Margin="0"
|
|
||||||
BorderThickness="0"
|
|
||||||
Style="{DynamicResource SettingGroupBox}">
|
|
||||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
|
||||||
<StackPanel Style="{StaticResource TextPanel}">
|
|
||||||
<TextBlock Style="{DynamicResource SettingTitleLabel}"
|
|
||||||
Text="{DynamicResource Date}" />
|
|
||||||
</StackPanel>
|
|
||||||
<StackPanel
|
|
||||||
Grid.Row="0"
|
|
||||||
Grid.Column="2"
|
|
||||||
Orientation="Horizontal">
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="0,0,10,0"
|
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
FontSize="14"
|
FontSize="14"
|
||||||
Foreground="{DynamicResource Color04B}"
|
Foreground="{DynamicResource Color04B}"
|
||||||
Text="{Binding DateText}" />
|
Text="{Binding DateText}" />
|
||||||
<ComboBox
|
<ComboBox
|
||||||
MinWidth="180"
|
MinWidth="180"
|
||||||
Margin="0,0,18,0"
|
Margin="10 0 18 0"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
FontSize="14"
|
FontSize="14"
|
||||||
ItemsSource="{Binding DateFormatList}"
|
ItemsSource="{Binding DateFormatList}"
|
||||||
SelectedItem="{Binding DateFormat}" />
|
SelectedItem="{Binding DateFormat}" />
|
||||||
<ui:ToggleSwitch
|
<ui:ToggleSwitch
|
||||||
Margin="0,0,18,0"
|
IsOn="{Binding UseDate}"
|
||||||
IsOn="{Binding UseDate, Mode=TwoWay}"
|
|
||||||
OffContent="{DynamicResource disable}"
|
OffContent="{DynamicResource disable}"
|
||||||
OnContent="{DynamicResource enable}" />
|
OnContent="{DynamicResource enable}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<TextBlock Style="{StaticResource Glyph}">
|
</cc:Card>
|
||||||

|
</cc:CardGroup>
|
||||||
</TextBlock>
|
|
||||||
</ItemsControl>
|
|
||||||
</Border>
|
|
||||||
</StackPanel>
|
|
||||||
</Border>
|
|
||||||
|
|
||||||
<Border
|
<!-- Animation -->
|
||||||
Margin="0,12,0,12"
|
<cc:CardGroup Margin="0 11 0 0">
|
||||||
Padding="0"
|
<cc:Card
|
||||||
Style="{DynamicResource SettingGroupBox}">
|
Icon=""
|
||||||
<StackPanel Orientation="Vertical">
|
Title="{DynamicResource Animation}"
|
||||||
<Border
|
Sub="{DynamicResource AnimationTip}">
|
||||||
Margin="0"
|
|
||||||
BorderThickness="0"
|
|
||||||
Style="{DynamicResource SettingGroupBox}">
|
|
||||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
|
||||||
<StackPanel Style="{StaticResource TextPanel}">
|
|
||||||
<TextBlock Style="{DynamicResource SettingTitleLabel}"
|
|
||||||
Text="{DynamicResource Animation}" />
|
|
||||||
<TextBlock Style="{DynamicResource SettingSubTitleLabel}"
|
|
||||||
Text="{DynamicResource AnimationTip}" />
|
|
||||||
</StackPanel>
|
|
||||||
<ui:ToggleSwitch
|
<ui:ToggleSwitch
|
||||||
x:Name="Animation"
|
IsOn="{Binding UseAnimation}"
|
||||||
Grid.Row="0"
|
|
||||||
Grid.Column="2"
|
|
||||||
Margin="0,0,18,0"
|
|
||||||
IsOn="{Binding UseAnimation, Mode=TwoWay}"
|
|
||||||
OffContent="{DynamicResource disable}"
|
OffContent="{DynamicResource disable}"
|
||||||
OnContent="{DynamicResource enable}" />
|
OnContent="{DynamicResource enable}" />
|
||||||
<TextBlock Style="{StaticResource Glyph}">
|
</cc:Card>
|
||||||

|
<cc:Card
|
||||||
</TextBlock>
|
Icon=""
|
||||||
</ItemsControl>
|
Title="{DynamicResource AnimationSpeed}"
|
||||||
</Border>
|
Sub="{DynamicResource AnimationSpeedTip}"
|
||||||
<Separator
|
Visibility="{Binding UseAnimation, Converter={StaticResource BoolToVisibilityConverter}}">
|
||||||
Width="Auto"
|
<StackPanel Orientation="Horizontal">
|
||||||
BorderThickness="1"
|
|
||||||
Style="{StaticResource SettingSeparatorStyle}" />
|
|
||||||
<Border Margin="0" BorderThickness="0">
|
|
||||||
<Border.Style>
|
|
||||||
<Style BasedOn="{StaticResource SettingGroupBox}" TargetType="Border">
|
|
||||||
<Setter Property="Visibility" Value="Collapsed" />
|
|
||||||
<Style.Triggers>
|
|
||||||
<DataTrigger Binding="{Binding ElementName=Animation, Path=IsOn}"
|
|
||||||
Value="True">
|
|
||||||
<Setter Property="Visibility" Value="Visible" />
|
|
||||||
</DataTrigger>
|
|
||||||
</Style.Triggers>
|
|
||||||
</Style>
|
|
||||||
</Border.Style>
|
|
||||||
|
|
||||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
|
||||||
<StackPanel Style="{StaticResource TextPanel}">
|
|
||||||
<TextBlock Style="{DynamicResource SettingTitleLabel}"
|
|
||||||
Text="{DynamicResource AnimationSpeed}" />
|
|
||||||
<TextBlock Style="{DynamicResource SettingSubTitleLabel}"
|
|
||||||
Text="{DynamicResource AnimationSpeedTip}" />
|
|
||||||
</StackPanel>
|
|
||||||
<StackPanel Grid.Column="2" Orientation="Horizontal">
|
|
||||||
<ComboBox
|
<ComboBox
|
||||||
x:Name="AnimationSpeed"
|
|
||||||
MinWidth="160"
|
MinWidth="160"
|
||||||
Margin="0,0,18,0"
|
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
DisplayMemberPath="Display"
|
DisplayMemberPath="Display"
|
||||||
FontSize="14"
|
FontSize="14"
|
||||||
ItemsSource="{Binding AnimationSpeeds}"
|
ItemsSource="{Binding AnimationSpeeds}"
|
||||||
SelectedValue="{Binding Settings.AnimationSpeed}"
|
SelectedValue="{Binding Settings.AnimationSpeed}"
|
||||||
SelectedValuePath="Value" />
|
SelectedValuePath="Value" />
|
||||||
<StackPanel Margin="0,0,18,0" Orientation="Horizontal">
|
|
||||||
<StackPanel.Style>
|
|
||||||
<Style TargetType="StackPanel">
|
|
||||||
<Setter Property="Visibility" Value="Collapsed" />
|
|
||||||
<Style.Triggers>
|
|
||||||
<DataTrigger
|
|
||||||
Binding="{Binding ElementName=AnimationSpeed, Path=SelectedValue}"
|
|
||||||
Value="{x:Static userSettings:AnimationSpeeds.Custom}">
|
|
||||||
<Setter Property="Visibility" Value="Visible" />
|
|
||||||
</DataTrigger>
|
|
||||||
</Style.Triggers>
|
|
||||||
</Style>
|
|
||||||
</StackPanel.Style>
|
|
||||||
<TextBox
|
<TextBox
|
||||||
Height="35"
|
Margin="18 0 0 0"
|
||||||
MinWidth="80"
|
MinWidth="80"
|
||||||
Text="{Binding Settings.CustomAnimationLength}"
|
Text="{Binding Settings.CustomAnimationLength}"
|
||||||
TextWrapping="NoWrap" />
|
TextWrapping="NoWrap"
|
||||||
|
Visibility="{ext:VisibleWhen
|
||||||
|
{Binding Settings.AnimationSpeed},
|
||||||
|
{x:Static userSettings:AnimationSpeeds.Custom}}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</cc:Card>
|
||||||
<TextBlock Style="{StaticResource Glyph}">
|
</cc:CardGroup>
|
||||||

|
|
||||||
</TextBlock>
|
|
||||||
</ItemsControl>
|
|
||||||
</Border>
|
|
||||||
</StackPanel>
|
|
||||||
</Border>
|
|
||||||
|
|
||||||
<Border
|
<!-- SFX -->
|
||||||
Margin="0,12,0,12"
|
<cc:CardGroup Margin="0 11 0 0">
|
||||||
Padding="0"
|
<cc:Card Icon="" Title="{DynamicResource SoundEffect}"
|
||||||
Style="{DynamicResource SettingGroupBox}">
|
Sub="{DynamicResource SoundEffectTip}">
|
||||||
<StackPanel Orientation="Vertical">
|
|
||||||
<Border
|
|
||||||
Margin="0"
|
|
||||||
BorderThickness="0"
|
|
||||||
Style="{DynamicResource SettingGroupBox}">
|
|
||||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
|
||||||
<StackPanel Style="{StaticResource TextPanel}">
|
|
||||||
<TextBlock Style="{DynamicResource SettingTitleLabel}"
|
|
||||||
Text="{DynamicResource SoundEffect}" />
|
|
||||||
<TextBlock Style="{DynamicResource SettingSubTitleLabel}"
|
|
||||||
Text="{DynamicResource SoundEffectTip}" />
|
|
||||||
</StackPanel>
|
|
||||||
<ui:ToggleSwitch
|
<ui:ToggleSwitch
|
||||||
x:Name="SoundEffect"
|
IsOn="{Binding UseSound}"
|
||||||
Grid.Row="0"
|
|
||||||
Grid.Column="2"
|
|
||||||
Margin="0,0,18,0"
|
|
||||||
IsOn="{Binding UseSound, Mode=TwoWay}"
|
|
||||||
OffContent="{DynamicResource disable}"
|
OffContent="{DynamicResource disable}"
|
||||||
OnContent="{DynamicResource enable}" />
|
OnContent="{DynamicResource enable}" />
|
||||||
<TextBlock Style="{StaticResource Glyph}">
|
</cc:Card>
|
||||||

|
<cc:Card Icon="" Title="{DynamicResource SoundEffectVolume}"
|
||||||
</TextBlock>
|
Sub="{DynamicResource SoundEffectVolumeTip}"
|
||||||
</ItemsControl>
|
Visibility="{Binding UseSound, Converter={StaticResource BoolToVisibilityConverter}}">
|
||||||
</Border>
|
<StackPanel Orientation="Horizontal">
|
||||||
<Separator
|
|
||||||
Width="Auto"
|
|
||||||
BorderThickness="1"
|
|
||||||
Style="{StaticResource SettingSeparatorStyle}" />
|
|
||||||
<Border Margin="0" BorderThickness="0">
|
|
||||||
<Border.Style>
|
|
||||||
<Style BasedOn="{StaticResource SettingGroupBox}" TargetType="Border">
|
|
||||||
<Setter Property="Visibility" Value="Collapsed" />
|
|
||||||
<Style.Triggers>
|
|
||||||
<DataTrigger Binding="{Binding ElementName=SoundEffect, Path=IsOn}"
|
|
||||||
Value="True">
|
|
||||||
<Setter Property="Visibility" Value="Visible" />
|
|
||||||
</DataTrigger>
|
|
||||||
</Style.Triggers>
|
|
||||||
</Style>
|
|
||||||
</Border.Style>
|
|
||||||
|
|
||||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
|
||||||
<StackPanel Style="{StaticResource TextPanel}">
|
|
||||||
<TextBlock Style="{DynamicResource SettingTitleLabel}"
|
|
||||||
Text="{DynamicResource SoundEffectVolume}" />
|
|
||||||
<TextBlock Style="{DynamicResource SettingSubTitleLabel}"
|
|
||||||
Text="{DynamicResource SoundEffectVolumeTip}" />
|
|
||||||
</StackPanel>
|
|
||||||
<StackPanel Grid.Column="2" Orientation="Horizontal">
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Width="Auto"
|
Margin="0 0 8 0"
|
||||||
Margin="0,0,8,2"
|
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Foreground="{DynamicResource Color05B}"
|
Text="{Binding SoundEffectVolume}" />
|
||||||
Text="{Binding ElementName=SoundEffectValue, Path=Value, UpdateSourceTrigger=PropertyChanged}"
|
|
||||||
TextAlignment="Right" />
|
|
||||||
<Slider
|
<Slider
|
||||||
Name="SoundEffectValue"
|
|
||||||
Width="250"
|
Width="250"
|
||||||
Margin="0,0,18,0"
|
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
IsMoveToPointEnabled="True"
|
IsMoveToPointEnabled="True"
|
||||||
IsSnapToTickEnabled="True"
|
IsSnapToTickEnabled="True"
|
||||||
Maximum="100"
|
Maximum="100"
|
||||||
Minimum="0"
|
Minimum="0"
|
||||||
TickFrequency="1"
|
TickFrequency="1"
|
||||||
Value="{Binding SoundEffectVolume, Mode=TwoWay}" />
|
Value="{Binding SoundEffectVolume}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<TextBlock Style="{StaticResource Glyph}">
|
</cc:Card>
|
||||||

|
</cc:CardGroup>
|
||||||
</TextBlock>
|
|
||||||
</ItemsControl>
|
|
||||||
</Border>
|
|
||||||
</StackPanel>
|
|
||||||
</Border>
|
|
||||||
|
|
||||||
<Border Margin="0,12,0,12" Style="{DynamicResource SettingGroupBox}">
|
<!-- Settings color scheme -->
|
||||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
<cc:Card Icon="" Title="{DynamicResource ColorScheme}" Margin="0 11 0 0">
|
||||||
<StackPanel Style="{StaticResource TextPanel}">
|
|
||||||
<TextBlock Style="{DynamicResource SettingTitleLabel}"
|
|
||||||
Text="{DynamicResource ColorScheme}" />
|
|
||||||
</StackPanel>
|
|
||||||
<ComboBox
|
<ComboBox
|
||||||
x:Name="ColorSchemeComboBox"
|
|
||||||
Grid.Column="2"
|
|
||||||
MinWidth="180"
|
MinWidth="180"
|
||||||
Margin="0,0,18,0"
|
|
||||||
DisplayMemberPath="Display"
|
DisplayMemberPath="Display"
|
||||||
FontSize="14"
|
FontSize="14"
|
||||||
ItemsSource="{Binding ColorSchemes}"
|
ItemsSource="{Binding ColorSchemes}"
|
||||||
SelectedValue="{Binding Settings.ColorScheme}"
|
SelectedValue="{Binding Settings.ColorScheme}"
|
||||||
SelectedValuePath="Value" />
|
SelectedValuePath="Value" />
|
||||||
<TextBlock Style="{StaticResource Glyph}">
|
</cc:Card>
|
||||||

|
|
||||||
</TextBlock>
|
|
||||||
</ItemsControl>
|
|
||||||
</Border>
|
|
||||||
|
|
||||||
<Border Margin="0,0,0,0" Style="{DynamicResource SettingGroupBox}">
|
<!-- Theme folder -->
|
||||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
<cc:Card Icon="" Title="{DynamicResource ThemeFolder}">
|
||||||
<StackPanel Style="{StaticResource TextPanel}">
|
|
||||||
<TextBlock Style="{DynamicResource SettingTitleLabel}"
|
|
||||||
Text="{DynamicResource ThemeFolder}" />
|
|
||||||
</StackPanel>
|
|
||||||
<Button
|
<Button
|
||||||
Grid.Column="2"
|
|
||||||
MinWidth="180"
|
MinWidth="180"
|
||||||
Margin="0,0,18,0"
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
Command="{Binding OpenThemesFolderCommand}"
|
Command="{Binding OpenThemesFolderCommand}"
|
||||||
Content="{DynamicResource OpenThemeFolder}" />
|
Content="{DynamicResource OpenThemeFolder}" />
|
||||||
<TextBlock Style="{StaticResource Glyph}">
|
</cc:Card>
|
||||||

|
|
||||||
</TextBlock>
|
<!-- How to create theme link -->
|
||||||
</ItemsControl>
|
<cc:HyperLink
|
||||||
</Border>
|
Margin="10 10 10 28"
|
||||||
<Border>
|
|
||||||
<TextBlock
|
|
||||||
Margin="10,10,10,18"
|
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
DockPanel.Dock="Top">
|
Uri="{Binding LinkHowToCreateTheme}"
|
||||||
<Hyperlink NavigateUri="{Binding LinkHowToCreateTheme, Mode=OneWay}"
|
Text="{DynamicResource howToCreateTheme}" />
|
||||||
RequestNavigate="Hyperlink_OnRequestNavigate">
|
|
||||||
<Run Text="{DynamicResource howToCreateTheme}" />
|
|
||||||
</Hyperlink>
|
|
||||||
</TextBlock>
|
|
||||||
</Border>
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
|
||||||
</Grid>
|
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</ui:Page>
|
</ui:Page>
|
||||||
|
|
|
||||||
|
|
@ -22,10 +22,4 @@ public partial class SettingsPaneTheme : Page
|
||||||
|
|
||||||
base.OnNavigatedTo(e);
|
base.OnNavigatedTo(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Hyperlink_OnRequestNavigate(object sender, RequestNavigateEventArgs e)
|
|
||||||
{
|
|
||||||
App.API.OpenUrl(e.Uri);
|
|
||||||
e.Handled = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue