mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Adjust Theme List Style
This commit is contained in:
parent
ea532a31fc
commit
e28626abed
2 changed files with 91 additions and 113 deletions
|
|
@ -25,7 +25,7 @@
|
|||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Rectangle
|
||||
Margin="-8,-4,-8,-4"
|
||||
Margin="-8 -4 -8 -4"
|
||||
RadiusX="5"
|
||||
RadiusY="5"
|
||||
Stroke="{DynamicResource Color05B}"
|
||||
|
|
@ -54,31 +54,73 @@
|
|||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="ThemeList" TargetType="ListBoxItem">
|
||||
<Setter Property="Background" Value="Red" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="Margin" Value="4" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ListBoxItem}">
|
||||
<Border
|
||||
x:Name="Bd"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Background="{DynamicResource Color12B}"
|
||||
BorderBrush="{DynamicResource Color03B}"
|
||||
BorderThickness="1 1 1 0"
|
||||
CornerRadius="4"
|
||||
SnapsToDevicePixels="true">
|
||||
<Border
|
||||
x:Name="Bd2"
|
||||
BorderBrush="{DynamicResource Color14B}"
|
||||
BorderThickness="0 0 0 2"
|
||||
CornerRadius="4">
|
||||
<ContentPresenter
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||
</Border>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource ThemeHoverButton}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsSelected" Value="true">
|
||||
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource ToggleSwitchFillOn}" />
|
||||
<Setter TargetName="Bd2" Property="BorderThickness" Value="0" />
|
||||
<Setter TargetName="Bd2" Property="TextElement.Foreground" Value="{DynamicResource Color02B}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="SettingGroupBox" TargetType="{x:Type Border}">
|
||||
<Setter Property="Background" Value="{DynamicResource Color00B}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource Color03B}" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="CornerRadius" Value="5" />
|
||||
<Setter Property="Margin" Value="0,5,0,0" />
|
||||
<Setter Property="Padding" Value="0,15,0,15" />
|
||||
<Setter Property="Margin" Value="0 5 0 0" />
|
||||
<Setter Property="Padding" Value="0 15 0 15" />
|
||||
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||
</Style>
|
||||
<Style x:Key="SettingTitleLabel" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
|
||||
<Setter Property="Margin" Value="0,0,0,0" />
|
||||
<Setter Property="Margin" Value="0 0 0 0" />
|
||||
<Setter Property="TextWrapping" Value="Wrap" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="SettingSubTitleLabel" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="{DynamicResource Color04B}" />
|
||||
<Setter Property="FontSize" Value="12" />
|
||||
<Setter Property="Margin" Value="0,0,0,0" />
|
||||
<Setter Property="Padding" Value="0,0,24,0" />
|
||||
<Setter Property="Margin" Value="0 0 0 0" />
|
||||
<Setter Property="Padding" Value="0 0 24 0" />
|
||||
<Setter Property="TextWrapping" Value="WrapWithOverflow" />
|
||||
</Style>
|
||||
<Style x:Key="TextPanel" TargetType="{x:Type StackPanel}">
|
||||
<Setter Property="Grid.Column" Value="1" />
|
||||
<Setter Property="Margin" Value="0,0,0,0" />
|
||||
<Setter Property="Margin" Value="0 0 0 0" />
|
||||
<Setter Property="Width" Value="Auto" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
|
|
@ -89,7 +131,7 @@
|
|||
TargetType="{x:Type CheckBox}">
|
||||
<Setter Property="Width" Value="24" />
|
||||
<Setter Property="Grid.Column" Value="2" />
|
||||
<Setter Property="Margin" Value="0,4,10,4" />
|
||||
<Setter Property="Margin" Value="0 4 10 4" />
|
||||
<Setter Property="LayoutTransform">
|
||||
<Setter.Value>
|
||||
<ScaleTransform ScaleX="1" ScaleY="1" />
|
||||
|
|
@ -100,7 +142,7 @@
|
|||
<Style x:Key="SideTextAbout" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="HorizontalAlignment" Value="Right" />
|
||||
<Setter Property="Grid.Column" Value="1" />
|
||||
<Setter Property="Margin" Value="0,0,-18,0" />
|
||||
<Setter Property="Margin" Value="0 0 -18 0" />
|
||||
</Style>
|
||||
|
||||
|
||||
|
|
@ -123,8 +165,8 @@
|
|||
x:Name="Spacer"
|
||||
Width="Auto"
|
||||
Height="Auto"
|
||||
Margin="0,10,5,0"
|
||||
Padding="0,0,0,0"
|
||||
Margin="0 10 5 0"
|
||||
Padding="0 0 0 0"
|
||||
BorderBrush="Transparent"
|
||||
BorderThickness="0">
|
||||
<Border
|
||||
|
|
@ -133,7 +175,7 @@
|
|||
CornerRadius="5">
|
||||
<ContentPresenter
|
||||
x:Name="ContentSite"
|
||||
Margin="12,12,0,12"
|
||||
Margin="12 12 0 12"
|
||||
HorizontalAlignment="LEFT"
|
||||
VerticalAlignment="Center"
|
||||
ContentSource="Header"
|
||||
|
|
@ -165,8 +207,8 @@
|
|||
<Border
|
||||
x:Name="border"
|
||||
Height="40"
|
||||
Margin="14,4,8,4"
|
||||
Padding="0,0,0,0"
|
||||
Margin="14 4 8 4"
|
||||
Padding="0 0 0 0"
|
||||
HorizontalAlignment="Stretch"
|
||||
Background="{DynamicResource Color01B}"
|
||||
CornerRadius="5">
|
||||
|
|
@ -180,7 +222,7 @@
|
|||
Grid.Column="0"
|
||||
Width="4"
|
||||
Height="18"
|
||||
Margin="0,11,0,11"
|
||||
Margin="0 11 0 11"
|
||||
Fill="{DynamicResource ToggleSwitchFillOn}"
|
||||
RadiusX="2"
|
||||
RadiusY="2"
|
||||
|
|
@ -188,7 +230,7 @@
|
|||
<ContentPresenter
|
||||
x:Name="ContentSite"
|
||||
Grid.Column="1"
|
||||
Margin="12,11,18,11"
|
||||
Margin="12 11 18 11"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
ContentSource="Header"
|
||||
|
|
@ -212,10 +254,10 @@
|
|||
|
||||
<Style x:Key="PluginList" TargetType="ListBoxItem">
|
||||
<Setter Property="Background" Value="{DynamicResource Color00B}" />
|
||||
<Setter Property="Padding" Value="0,0,0,0" />
|
||||
<Setter Property="Padding" Value="0 0 0 0" />
|
||||
<Setter Property="UseLayoutRounding" Value="True" />
|
||||
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||
<Setter Property="Margin" Value="0,0,18,5" />
|
||||
<Setter Property="Margin" Value="0 0 18 5" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource Color03B}" />
|
||||
<!--#region Template for blue highlight win10-->
|
||||
|
|
@ -255,7 +297,7 @@
|
|||
</MultiTrigger.Conditions>
|
||||
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource Color00B}" />
|
||||
<Setter TargetName="Bd" Property="BorderBrush" Value="{DynamicResource Color03B}" />
|
||||
<Setter TargetName="Bd" Property="Margin" Value="0,0,0,0" />
|
||||
<Setter TargetName="Bd" Property="Margin" Value="0 0 0 0" />
|
||||
|
||||
|
||||
</MultiTrigger>
|
||||
|
|
@ -267,7 +309,7 @@
|
|||
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource Color00B}" />
|
||||
<Setter TargetName="Bd" Property="BorderBrush" Value="{DynamicResource Color03B}" />
|
||||
<Setter TargetName="Bd" Property="CornerRadius" Value="5" />
|
||||
<Setter TargetName="Bd" Property="Margin" Value="0,0,0,0" />
|
||||
<Setter TargetName="Bd" Property="Margin" Value="0 0 0 0" />
|
||||
|
||||
|
||||
</MultiTrigger>
|
||||
|
|
@ -284,10 +326,10 @@
|
|||
|
||||
<!--#region PluginStore Style-->
|
||||
<Style x:Key="StoreList" TargetType="ListViewItem">
|
||||
<Setter Property="Padding" Value="0,0,0,0" />
|
||||
<Setter Property="Padding" Value="0 0 0 0" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||
<Setter Property="Margin" Value="0,0,8,8" />
|
||||
<Setter Property="Margin" Value="0 0 8 8" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Stretch" />
|
||||
<!--#region Template for blue highlight win10-->
|
||||
<Setter Property="Template">
|
||||
|
|
@ -325,10 +367,10 @@
|
|||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Grid Margin="20,0,0,0">
|
||||
<Grid Margin="20 0 0 0">
|
||||
<StackPanel>
|
||||
<TextBlock
|
||||
Margin="0,20,0,4"
|
||||
Margin="0 20 0 4"
|
||||
FontWeight="Bold"
|
||||
Text="{DynamicResource searchplugin_Noresult_Title}" />
|
||||
<TextBlock Text="{DynamicResource searchplugin_Noresult_Subtitle}" />
|
||||
|
|
@ -351,10 +393,10 @@
|
|||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Grid Margin="20,0,0,0">
|
||||
<Grid Margin="20 0 0 0">
|
||||
<StackPanel>
|
||||
<TextBlock
|
||||
Margin="0,20,0,4"
|
||||
Margin="0 20 0 4"
|
||||
FontWeight="Bold"
|
||||
Text="{DynamicResource searchplugin_Noresult_Title}" />
|
||||
<TextBlock Text="{DynamicResource searchplugin_Noresult}" />
|
||||
|
|
@ -394,7 +436,7 @@
|
|||
x:Name="headerPanel"
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Margin="2,2,2,0"
|
||||
Margin="2 2 2 0"
|
||||
Panel.ZIndex="1"
|
||||
Background="Transparent"
|
||||
IsItemsHost="true"
|
||||
|
|
|
|||
|
|
@ -378,89 +378,33 @@
|
|||
</cc:Card>
|
||||
|
||||
<!-- Theme -->
|
||||
<Border
|
||||
Height="64"
|
||||
<cc:ExCard
|
||||
Title="{DynamicResource theme}"
|
||||
Margin="0 8 0 0"
|
||||
CornerRadius="5 5 0 0"
|
||||
Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource theme}" />
|
||||
Icon="">
|
||||
<cc:ExCard.SideContent>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding SelectedItem.Name, RelativeSource={RelativeSource AncestorType={x:Type ListBox}}}" />
|
||||
</StackPanel>
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
|
||||
<Border
|
||||
Margin="0"
|
||||
Padding="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
BorderThickness="1 0 1 1"
|
||||
CornerRadius="0 0 5 5"
|
||||
Style="{DynamicResource SettingGroupBox}">
|
||||
</cc:ExCard.SideContent>
|
||||
<ListBox
|
||||
Margin="12"
|
||||
HorizontalAlignment="Center"
|
||||
HorizontalContentAlignment="Center"
|
||||
ui:ScrollViewerHelper.AutoHideScrollBars="True"
|
||||
Background="#ffffff"
|
||||
Padding="18 12 18 12"
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
Background="Transparent"
|
||||
BorderBrush="{DynamicResource Color03B}"
|
||||
BorderThickness="0 1 0 0"
|
||||
ItemContainerStyle="{DynamicResource ThemeList}"
|
||||
ItemsSource="{Binding Themes}"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Disabled"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
SelectedValue="{Binding SelectedTheme}"
|
||||
SelectedValuePath="FileNameWithoutExtension">
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
|
||||
<Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="Margin" Value="4" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ListBoxItem}">
|
||||
<Border
|
||||
x:Name="Bd"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Background="{DynamicResource Color12B}"
|
||||
BorderBrush="{DynamicResource Color03B}"
|
||||
BorderThickness="1 1 1 0"
|
||||
CornerRadius="4"
|
||||
SnapsToDevicePixels="true">
|
||||
<Border
|
||||
x:Name="Bd2"
|
||||
BorderBrush="{DynamicResource Color14B}"
|
||||
BorderThickness="0 0 0 2"
|
||||
CornerRadius="4">
|
||||
<ContentPresenter
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||
</Border>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource ThemeHoverButton}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsSelected" Value="true">
|
||||
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource ToggleSwitchFillOn}" />
|
||||
<Setter TargetName="Bd2" Property="BorderThickness" Value="0" />
|
||||
<Setter TargetName="Bd2" Property="TextElement.Foreground" Value="{DynamicResource Color02B}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
<ListBox.Template>
|
||||
<!-- For Scroll Wheel inside listbox area -->
|
||||
<ControlTemplate>
|
||||
<ItemsPresenter />
|
||||
</ControlTemplate>
|
||||
</ListBox.Template>
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel />
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid
|
||||
|
|
@ -469,14 +413,12 @@
|
|||
Margin="0">
|
||||
<StackPanel Margin="12 0" Orientation="Horizontal">
|
||||
<TextBlock
|
||||
x:Name="ThemeName"
|
||||
Margin="0 0 0 0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="12"
|
||||
Text="{Binding Name}"
|
||||
TextWrapping="Wrap" />
|
||||
|
||||
<ui:FontIcon
|
||||
Margin="8 0 0 0"
|
||||
VerticalAlignment="Center"
|
||||
|
|
@ -493,21 +435,15 @@
|
|||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel />
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
</ListBox>
|
||||
|
||||
</Border>
|
||||
|
||||
</cc:ExCard>
|
||||
<cc:HyperLink
|
||||
Margin="10"
|
||||
HorizontalAlignment="Right"
|
||||
Text="{DynamicResource browserMoreThemes}"
|
||||
Uri="{Binding LinkThemeGallery}" />
|
||||
|
||||
<!-- Fixed Height -->
|
||||
<cc:CardGroup Margin="0 20 0 0">
|
||||
<cc:Card
|
||||
Title="{DynamicResource KeepMaxResults}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue