mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Add setting ui
This commit is contained in:
parent
37cab1b30c
commit
29b74624c7
1 changed files with 78 additions and 50 deletions
|
|
@ -92,41 +92,43 @@
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="Expander">
|
<ControlTemplate TargetType="Expander">
|
||||||
<Border
|
<Border
|
||||||
Background="{TemplateBinding Background}"
|
Background="{TemplateBinding Background}"
|
||||||
BorderBrush="{TemplateBinding BorderBrush}"
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
BorderThickness="{TemplateBinding BorderThickness}"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
SnapsToDevicePixels="true">
|
SnapsToDevicePixels="true">
|
||||||
<DockPanel>
|
<DockPanel>
|
||||||
<ToggleButton
|
<ToggleButton
|
||||||
x:Name="HeaderSite"
|
x:Name="HeaderSite"
|
||||||
MinWidth="0"
|
MinWidth="0"
|
||||||
MinHeight="0"
|
MinHeight="0"
|
||||||
Margin="0"
|
Margin="0"
|
||||||
Padding="{TemplateBinding Padding}"
|
Padding="{TemplateBinding Padding}"
|
||||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||||
Content="{TemplateBinding Header}"
|
Content="{TemplateBinding Header}"
|
||||||
ContentTemplate="{TemplateBinding HeaderTemplate}"
|
ContentTemplate="{TemplateBinding HeaderTemplate}"
|
||||||
ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
|
ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
|
||||||
DockPanel.Dock="Top"
|
DockPanel.Dock="Top"
|
||||||
FocusVisualStyle="{StaticResource ExpanderHeaderFocusVisual}"
|
FocusVisualStyle="{StaticResource ExpanderHeaderFocusVisual}"
|
||||||
FontFamily="{TemplateBinding FontFamily}"
|
FontFamily="{TemplateBinding FontFamily}"
|
||||||
FontSize="{TemplateBinding FontSize}"
|
FontSize="{TemplateBinding FontSize}"
|
||||||
FontStretch="{TemplateBinding FontStretch}"
|
FontStretch="{TemplateBinding FontStretch}"
|
||||||
FontStyle="{TemplateBinding FontStyle}"
|
FontStyle="{TemplateBinding FontStyle}"
|
||||||
FontWeight="{TemplateBinding FontWeight}"
|
FontWeight="{TemplateBinding FontWeight}"
|
||||||
Foreground="{TemplateBinding Foreground}"
|
Foreground="{TemplateBinding Foreground}"
|
||||||
IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
|
IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
|
||||||
Style="{StaticResource ExpanderHeaderRightArrowStyle}" />
|
Style="{StaticResource ExpanderHeaderRightArrowStyle}" />
|
||||||
<Border x:Name="ContentPresenterBorder" BorderThickness="0,1,0,0"
|
<Border
|
||||||
BorderBrush="{DynamicResource Color03B}">
|
x:Name="ContentPresenterBorder"
|
||||||
|
BorderBrush="{DynamicResource Color03B}"
|
||||||
|
BorderThickness="0 1 0 0">
|
||||||
<ContentPresenter
|
<ContentPresenter
|
||||||
x:Name="ExpandSite"
|
x:Name="ExpandSite"
|
||||||
Margin="{TemplateBinding Padding}"
|
Margin="{TemplateBinding Padding}"
|
||||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||||
DockPanel.Dock="Bottom"
|
DockPanel.Dock="Bottom"
|
||||||
Focusable="false" />
|
Focusable="false" />
|
||||||
<Border.LayoutTransform>
|
<Border.LayoutTransform>
|
||||||
<ScaleTransform ScaleY="0" />
|
<ScaleTransform ScaleY="0" />
|
||||||
</Border.LayoutTransform>
|
</Border.LayoutTransform>
|
||||||
|
|
@ -141,13 +143,17 @@
|
||||||
<BeginStoryboard>
|
<BeginStoryboard>
|
||||||
<Storyboard>
|
<Storyboard>
|
||||||
<DoubleAnimation
|
<DoubleAnimation
|
||||||
Storyboard.TargetName="ContentPresenterBorder"
|
Storyboard.TargetName="ContentPresenterBorder"
|
||||||
Storyboard.TargetProperty="(Border.LayoutTransform).(ScaleTransform.ScaleY)"
|
Storyboard.TargetProperty="(Border.LayoutTransform).(ScaleTransform.ScaleY)"
|
||||||
From="0.0" To="1.0" Duration="0:0:0" />
|
From="0.0"
|
||||||
|
To="1.0"
|
||||||
|
Duration="0:0:0" />
|
||||||
<DoubleAnimation
|
<DoubleAnimation
|
||||||
Storyboard.TargetName="ContentPresenterBorder"
|
Storyboard.TargetName="ContentPresenterBorder"
|
||||||
Storyboard.TargetProperty="(Border.Opacity)"
|
Storyboard.TargetProperty="(Border.Opacity)"
|
||||||
From="0.0" To="1.0" Duration="0:0:0" />
|
From="0.0"
|
||||||
|
To="1.0"
|
||||||
|
Duration="0:0:0" />
|
||||||
</Storyboard>
|
</Storyboard>
|
||||||
</BeginStoryboard>
|
</BeginStoryboard>
|
||||||
</Trigger.EnterActions>
|
</Trigger.EnterActions>
|
||||||
|
|
@ -155,13 +161,17 @@
|
||||||
<BeginStoryboard>
|
<BeginStoryboard>
|
||||||
<Storyboard>
|
<Storyboard>
|
||||||
<DoubleAnimation
|
<DoubleAnimation
|
||||||
Storyboard.TargetName="ContentPresenterBorder"
|
Storyboard.TargetName="ContentPresenterBorder"
|
||||||
Storyboard.TargetProperty="(Border.LayoutTransform).(ScaleTransform.ScaleY)"
|
Storyboard.TargetProperty="(Border.LayoutTransform).(ScaleTransform.ScaleY)"
|
||||||
From="1.0" To="0.0" Duration="0:0:0" />
|
From="1.0"
|
||||||
|
To="0.0"
|
||||||
|
Duration="0:0:0" />
|
||||||
<DoubleAnimation
|
<DoubleAnimation
|
||||||
Storyboard.TargetName="ContentPresenterBorder"
|
Storyboard.TargetName="ContentPresenterBorder"
|
||||||
Storyboard.TargetProperty="(Border.Opacity)"
|
Storyboard.TargetProperty="(Border.Opacity)"
|
||||||
From="1.0" To="0.0" Duration="0:0:0" />
|
From="1.0"
|
||||||
|
To="0.0"
|
||||||
|
Duration="0:0:0" />
|
||||||
</Storyboard>
|
</Storyboard>
|
||||||
</BeginStoryboard>
|
</BeginStoryboard>
|
||||||
</Trigger.ExitActions>
|
</Trigger.ExitActions>
|
||||||
|
|
@ -734,10 +744,28 @@
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
DragEnter="lbxAccessLinks_DragEnter"
|
DragEnter="lbxAccessLinks_DragEnter"
|
||||||
Drop="LbxAccessLinks_OnDrop"
|
Drop="LbxAccessLinks_OnDrop"
|
||||||
ItemTemplate="{StaticResource ListViewTemplateAccessLinks}"
|
|
||||||
ItemsSource="{Binding Settings.QuickAccessLinks}"
|
ItemsSource="{Binding Settings.QuickAccessLinks}"
|
||||||
Loaded="lbxAccessLinks_Loaded"
|
Loaded="lbxAccessLinks_Loaded"
|
||||||
SelectedItem="{Binding SelectedQuickAccessLink}" />
|
SelectedItem="{Binding SelectedQuickAccessLink}">
|
||||||
|
<ListView.View>
|
||||||
|
<GridView>
|
||||||
|
<GridViewColumn Width="600" Header="{DynamicResource plugin_explorer_name}">
|
||||||
|
<GridViewColumn.CellTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding Name}" />
|
||||||
|
</DataTemplate>
|
||||||
|
</GridViewColumn.CellTemplate>
|
||||||
|
</GridViewColumn>
|
||||||
|
<GridViewColumn Width="900" Header="{DynamicResource plugin_explorer_path}">
|
||||||
|
<GridViewColumn.CellTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding Path}" TextTrimming="CharacterEllipsis" />
|
||||||
|
</DataTemplate>
|
||||||
|
</GridViewColumn.CellTemplate>
|
||||||
|
</GridViewColumn>
|
||||||
|
</GridView>
|
||||||
|
</ListView.View>
|
||||||
|
</ListView>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<StackPanel
|
<StackPanel
|
||||||
|
|
@ -755,13 +783,13 @@
|
||||||
<Button
|
<Button
|
||||||
MinWidth="100"
|
MinWidth="100"
|
||||||
Margin="{StaticResource SettingPanelItemLeftMargin}"
|
Margin="{StaticResource SettingPanelItemLeftMargin}"
|
||||||
Command="{Binding EditLinkCommand}"
|
Command="{Binding EditQuickAccessLinkCommand}"
|
||||||
CommandParameter="QuickAccessLink"
|
CommandParameter="QuickAccessLink"
|
||||||
Content="{DynamicResource plugin_explorer_edit}" />
|
Content="{DynamicResource plugin_explorer_edit}" />
|
||||||
<Button
|
<Button
|
||||||
MinWidth="100"
|
MinWidth="100"
|
||||||
Margin="{StaticResource SettingPanelItemLeftMargin}"
|
Margin="{StaticResource SettingPanelItemLeftMargin}"
|
||||||
Command="{Binding AddLinkCommand}"
|
Command="{Binding AddQuickAccessLinkCommand}"
|
||||||
CommandParameter="QuickAccessLink"
|
CommandParameter="QuickAccessLink"
|
||||||
Content="{DynamicResource plugin_explorer_add}" />
|
Content="{DynamicResource plugin_explorer_add}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
@ -822,13 +850,13 @@
|
||||||
<Button
|
<Button
|
||||||
MinWidth="100"
|
MinWidth="100"
|
||||||
Margin="{StaticResource SettingPanelItemLeftMargin}"
|
Margin="{StaticResource SettingPanelItemLeftMargin}"
|
||||||
Command="{Binding EditLinkCommand}"
|
Command="{Binding EditIndexSearchExcludePathsCommand}"
|
||||||
CommandParameter="IndexSearchExcludedPaths"
|
CommandParameter="IndexSearchExcludedPaths"
|
||||||
Content="{DynamicResource plugin_explorer_edit}" />
|
Content="{DynamicResource plugin_explorer_edit}" />
|
||||||
<Button
|
<Button
|
||||||
MinWidth="100"
|
MinWidth="100"
|
||||||
Margin="{StaticResource SettingPanelItemLeftMargin}"
|
Margin="{StaticResource SettingPanelItemLeftMargin}"
|
||||||
Command="{Binding AddLinkCommand}"
|
Command="{Binding AddIndexSearchExcludePathsCommand}"
|
||||||
CommandParameter="IndexSearchExcludedPaths"
|
CommandParameter="IndexSearchExcludedPaths"
|
||||||
Content="{DynamicResource plugin_explorer_add}" />
|
Content="{DynamicResource plugin_explorer_add}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue