- Reordered the settings items and changed some items to expandable card type

- Replaced the theme creation guide link with the Theme Builder link
- Fix Padding for InsideFit card
This commit is contained in:
DB p 2025-03-30 15:37:22 +09:00
parent f07c09f6cc
commit a35fb34760
4 changed files with 109 additions and 101 deletions

View file

@ -20,21 +20,21 @@
<Setter Property="BorderThickness" Value="1" /> <Setter Property="BorderThickness" Value="1" />
<Setter Property="CornerRadius" Value="5" /> <Setter Property="CornerRadius" Value="5" />
<Setter Property="MinHeight" Value="68" /> <Setter Property="MinHeight" Value="68" />
<Setter Property="Padding" Value="0,15,0,15" /> <Setter Property="Padding" Value="0 15 0 15" />
<Setter Property="Margin" Value="0,4,0,0" /> <Setter Property="Margin" Value="0 4 0 0" />
<Setter Property="SnapsToDevicePixels" Value="True" /> <Setter Property="SnapsToDevicePixels" Value="True" />
<Style.Triggers> <Style.Triggers>
<DataTrigger Binding="{Binding Type, RelativeSource={RelativeSource AncestorType=local:Card}}" Value="Inside"> <DataTrigger Binding="{Binding Type, RelativeSource={RelativeSource AncestorType=local:Card}}" Value="Inside">
<Setter Property="BorderThickness" Value="0,1,0,0" /> <Setter Property="BorderThickness" Value="0 1 0 0" />
<Setter Property="CornerRadius" Value="0" /> <Setter Property="CornerRadius" Value="0" />
<Setter Property="Margin" Value="0,0,0,0" /> <Setter Property="Margin" Value="0 0 0 0" />
<Setter Property="Background" Value="Transparent" /> <Setter Property="Background" Value="Transparent" />
</DataTrigger> </DataTrigger>
<DataTrigger Binding="{Binding Type, RelativeSource={RelativeSource AncestorType=local:Card}}" Value="InsideFit"> <DataTrigger Binding="{Binding Type, RelativeSource={RelativeSource AncestorType=local:Card}}" Value="InsideFit">
<Setter Property="BorderThickness" Value="0,1,0,0" /> <Setter Property="BorderThickness" Value="0 1 0 0" />
<Setter Property="CornerRadius" Value="0" /> <Setter Property="CornerRadius" Value="0" />
<Setter Property="Margin" Value="0,0,0,0" /> <Setter Property="Margin" Value="0 0 0 0" />
<Setter Property="Padding" Value="38,0,26,0" /> <Setter Property="Padding" Value="35 0 26 0" />
<Setter Property="Background" Value="Transparent" /> <Setter Property="Background" Value="Transparent" />
</DataTrigger> </DataTrigger>
@ -73,7 +73,7 @@
<ContentControl <ContentControl
Grid.Row="0" Grid.Row="0"
Grid.Column="2" Grid.Column="2"
Margin="0,0,16,0" Margin="0 0 16 0"
HorizontalAlignment="Right" HorizontalAlignment="Right"
VerticalAlignment="Center" VerticalAlignment="Center"
Content="{TemplateBinding Content}" /> Content="{TemplateBinding Content}" />
@ -91,7 +91,7 @@
<TextBlock.Style> <TextBlock.Style>
<Style TargetType="{x:Type TextBlock}"> <Style TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="{DynamicResource Color05B}" /> <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" /> <Setter Property="TextWrapping" Value="Wrap" />
<Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="VerticalAlignment" Value="Center" />
</Style> </Style>
@ -107,8 +107,8 @@
</Style.Triggers> </Style.Triggers>
<Setter Property="Foreground" Value="{DynamicResource Color04B}" /> <Setter Property="Foreground" Value="{DynamicResource Color04B}" />
<Setter Property="FontSize" Value="12" /> <Setter Property="FontSize" Value="12" />
<Setter Property="Margin" Value="0,0,0,0" /> <Setter Property="Margin" Value="0 0 0 0" />
<Setter Property="Padding" Value="0,0,24,0" /> <Setter Property="Padding" Value="0 0 24 0" />
<Setter Property="TextWrapping" Value="WrapWithOverflow" /> <Setter Property="TextWrapping" Value="WrapWithOverflow" />
</Style> </Style>
</TextBlock.Style> </TextBlock.Style>
@ -120,11 +120,11 @@
<Style TargetType="{x:Type TextBlock}"> <Style TargetType="{x:Type TextBlock}">
<Style.Triggers> <Style.Triggers>
<DataTrigger Binding="{Binding ElementName=ItemIcon, Path=Text}" Value="{x:Static sys:String.Empty}"> <DataTrigger Binding="{Binding ElementName=ItemIcon, Path=Text}" Value="{x:Static sys:String.Empty}">
<Setter Property="Margin" Value="24,0,0,0" /> <Setter Property="Margin" Value="24 0 0 0" />
</DataTrigger> </DataTrigger>
</Style.Triggers> </Style.Triggers>
<Setter Property="Grid.Column" Value="0" /> <Setter Property="Grid.Column" Value="0" />
<Setter Property="Margin" Value="24,0,16,0" /> <Setter Property="Margin" Value="24 0 16 0" />
<Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="FontSize" Value="20" /> <Setter Property="FontSize" Value="20" />
<Setter Property="FontFamily" Value="/Resources/#Segoe Fluent Icons" /> <Setter Property="FontFamily" Value="/Resources/#Segoe Fluent Icons" />

View file

@ -24,7 +24,7 @@ public partial class SettingsPaneThemeViewModel : BaseModel
public Settings Settings { get; } public Settings Settings { get; }
private readonly Theme _theme = Ioc.Default.GetRequiredService<Theme>(); private readonly Theme _theme = Ioc.Default.GetRequiredService<Theme>();
public static string LinkHowToCreateTheme => @"https://flowlauncher.com/docs/#/how-to-create-a-theme"; public static string LinkHowToCreateTheme => @"https://www.flowlauncher.com/theme-builder/";
public static string LinkThemeGallery => "https://github.com/Flow-Launcher/Flow.Launcher/discussions/1438"; public static string LinkThemeGallery => "https://github.com/Flow-Launcher/Flow.Launcher/discussions/1438";
private List<Theme.ThemeData> _themes; private List<Theme.ThemeData> _themes;

View file

@ -29,29 +29,35 @@
Text="{DynamicResource general}" Text="{DynamicResource general}"
TextAlignment="left" /> TextAlignment="left" />
<cc:Card Title="{DynamicResource startFlowLauncherOnSystemStartup}" Icon="&#xe8fc;"> <cc:CardGroup Margin="0 10 0 0">
<ui:ToggleSwitch
IsOn="{Binding StartFlowLauncherOnSystemStartup}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:Card>
<cc:Card Title="{DynamicResource useLogonTaskForStartup}" Sub="{DynamicResource useLogonTaskForStartupTooltip}"> <cc:Card Title="{DynamicResource startFlowLauncherOnSystemStartup}" Icon="&#xe8fc;">
<ui:ToggleSwitch <ui:ToggleSwitch
IsOn="{Binding UseLogonTaskForStartup}" IsOn="{Binding StartFlowLauncherOnSystemStartup}"
OffContent="{DynamicResource disable}" OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" /> OnContent="{DynamicResource enable}" />
</cc:Card> </cc:Card>
<cc:Card <cc:Card
Title="{DynamicResource hideOnStartup}" Title="{DynamicResource useLogonTaskForStartup}"
Icon="&#xed1a;" Sub="{DynamicResource useLogonTaskForStartupTooltip}"
Sub="{DynamicResource hideOnStartupToolTip}"> Type="InsideFit">
<ui:ToggleSwitch <ui:ToggleSwitch
IsOn="{Binding Settings.HideOnStartup}" IsOn="{Binding UseLogonTaskForStartup}"
OffContent="{DynamicResource disable}" OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" /> OnContent="{DynamicResource enable}" />
</cc:Card> </cc:Card>
<cc:Card
Title="{DynamicResource hideOnStartup}"
Sub="{DynamicResource hideOnStartupToolTip}"
Type="InsideFit">
<ui:ToggleSwitch
IsOn="{Binding Settings.HideOnStartup}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:Card>
</cc:CardGroup>
<cc:Card Title="{DynamicResource hideFlowLauncherWhenLoseFocus}" Margin="0 14 0 0"> <cc:Card Title="{DynamicResource hideFlowLauncherWhenLoseFocus}" Margin="0 14 0 0">
<ui:ToggleSwitch <ui:ToggleSwitch

View file

@ -500,62 +500,29 @@
Uri="{Binding LinkThemeGallery}" /> Uri="{Binding LinkThemeGallery}" />
<!-- Fixed size --> <!-- Fixed size -->
<cc:CardGroup Margin="0 20 0 0"> <cc:ExCard
<cc:Card Title="{DynamicResource KeepMaxResults}"
Title="{DynamicResource KeepMaxResults}" Margin="0 20 0 0"
Icon="&#xE744;" Icon="&#xE744;"
Sub="{DynamicResource KeepMaxResultsToolTip}"> Sub="{DynamicResource KeepMaxResultsToolTip}">
<ui:ToggleSwitch <cc:ExCard.SideContent>
IsOn="{Binding KeepMaxResults}" <StackPanel VerticalAlignment="Center" Orientation="Horizontal">
OffContent="{DynamicResource disable}" <ui:ToggleSwitch
OnContent="{DynamicResource enable}" /> IsOn="{Binding KeepMaxResults}"
</cc:Card> OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</StackPanel>
</cc:ExCard.SideContent>
<cc:Card <cc:Card
Title="{DynamicResource maxShowResults}" Title="{DynamicResource maxShowResults}"
Icon="&#xe8fd;"
Sub="{DynamicResource maxShowResultsToolTip}" Sub="{DynamicResource maxShowResultsToolTip}"
Visibility="{Binding KeepMaxResults, Converter={StaticResource BoolToVisibilityConverter}}"> Type="InsideFit">
<ComboBox <ComboBox
Width="100" Width="100"
ItemsSource="{Binding MaxResultsRange}" ItemsSource="{Binding MaxResultsRange}"
SelectedItem="{Binding Settings.MaxResultsToShow}" /> SelectedItem="{Binding Settings.MaxResultsToShow}" />
</cc:Card> </cc:Card>
</cc:CardGroup> </cc:ExCard>
<!-- Fonts and icons -->
<cc:Card
Title="{DynamicResource useGlyphUI}"
Margin="0 14 0 0"
Icon="&#xf6b8;"
Sub="{DynamicResource useGlyphUIEffect}">
<ui:ToggleSwitch
IsOn="{Binding UseGlyphIcons}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:Card>
<!-- Placeholder text -->
<cc:CardGroup Margin="0 14 0 0">
<cc:Card
Title="{DynamicResource ShowPlaceholder}"
Icon="&#xE82F;"
Sub="{DynamicResource ShowPlaceholderTip}">
<ui:ToggleSwitch
IsOn="{Binding ShowPlaceholder}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:Card>
<cc:Card
Title="{DynamicResource PlaceholderText}"
Icon="&#xED59;"
Sub="{Binding PlaceholderTextTip}">
<TextBox
MinWidth="150"
Text="{Binding PlaceholderText}"
TextWrapping="NoWrap" />
</cc:Card>
</cc:CardGroup>
<!-- Time and date --> <!-- Time and date -->
<cc:CardGroup Margin="0 14 0 0"> <cc:CardGroup Margin="0 14 0 0">
@ -602,22 +569,45 @@
</cc:Card> </cc:Card>
</cc:CardGroup> </cc:CardGroup>
<!-- Animation --> <!-- Placeholder text -->
<cc:CardGroup Margin="0 14 0 0"> <cc:ExCard
Title="{DynamicResource ShowPlaceholder}"
Margin="0 4 0 0"
Icon="&#xea80;"
Sub="{DynamicResource ShowPlaceholderTip}">
<cc:ExCard.SideContent>
<ui:ToggleSwitch
IsOn="{Binding ShowPlaceholder}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:ExCard.SideContent>
<cc:Card <cc:Card
Title="{DynamicResource Animation}" Title="{DynamicResource PlaceholderText}"
Icon="&#xedb5;" Sub="{Binding PlaceholderTextTip}"
Sub="{DynamicResource AnimationTip}"> Type="InsideFit">
<TextBox
MinWidth="150"
Text="{Binding PlaceholderText}"
TextWrapping="NoWrap" />
</cc:Card>
</cc:ExCard>
<!-- Animation -->
<cc:ExCard
Title="{DynamicResource Animation}"
Margin="0 18 0 0"
Icon="&#xedb5;"
Sub="{DynamicResource AnimationTip}">
<cc:ExCard.SideContent>
<ui:ToggleSwitch <ui:ToggleSwitch
IsOn="{Binding UseAnimation}" IsOn="{Binding UseAnimation}"
OffContent="{DynamicResource disable}" OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" /> OnContent="{DynamicResource enable}" />
</cc:Card> </cc:ExCard.SideContent>
<cc:Card <cc:Card
Title="{DynamicResource AnimationSpeed}" Title="{DynamicResource AnimationSpeed}"
Icon="&#xe916;"
Sub="{DynamicResource AnimationSpeedTip}" Sub="{DynamicResource AnimationSpeedTip}"
Visibility="{Binding UseAnimation, Converter={StaticResource BoolToVisibilityConverter}}"> Type="InsideFit">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<ComboBox <ComboBox
MinWidth="160" MinWidth="160"
@ -637,25 +627,25 @@
IsEqualTo={x:Static userSettings:AnimationSpeeds.Custom}}" /> IsEqualTo={x:Static userSettings:AnimationSpeeds.Custom}}" />
</StackPanel> </StackPanel>
</cc:Card> </cc:Card>
</cc:CardGroup> </cc:ExCard>
<!-- SFX --> <!-- SFX -->
<cc:CardGroup Margin="0 14 0 0"> <cc:ExCard
<cc:Card Title="{DynamicResource SoundEffect}"
Title="{DynamicResource SoundEffect}" Margin="0 4 0 0"
Icon="&#xe7f5;" Icon="&#xe7f5;"
Sub="{DynamicResource SoundEffectTip}"> Sub="{DynamicResource SoundEffectTip}">
<cc:ExCard.SideContent>
<ui:ToggleSwitch <ui:ToggleSwitch
IsOn="{Binding UseSound}" IsOn="{Binding UseSound}"
OffContent="{DynamicResource disable}" OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" /> OnContent="{DynamicResource enable}" />
</cc:Card> </cc:ExCard.SideContent>
<cc:Card <cc:Card
Title="{DynamicResource SoundEffectVolume}" Title="{DynamicResource SoundEffectVolume}"
Icon="&#xe994;"
IsEnabled="{Binding EnableVolumeAdjustment}" IsEnabled="{Binding EnableVolumeAdjustment}"
Sub="{DynamicResource SoundEffectVolumeTip}" Sub="{DynamicResource SoundEffectVolumeTip}"
Visibility="{Binding UseSound, Converter={StaticResource BoolToVisibilityConverter}}"> Type="InsideFit">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<TextBlock <TextBlock
Margin="0 0 8 0" Margin="0 0 8 0"
@ -672,7 +662,7 @@
Value="{Binding SoundEffectVolume}" /> Value="{Binding SoundEffectVolume}" />
</StackPanel> </StackPanel>
</cc:Card> </cc:Card>
</cc:CardGroup> </cc:ExCard>
<Border <Border
Name="WMPWarning" Name="WMPWarning"
Padding="0 10" Padding="0 10"
@ -708,6 +698,18 @@
</Grid> </Grid>
</Border> </Border>
<!-- Fonts and icons -->
<cc:Card
Title="{DynamicResource useGlyphUI}"
Margin="0 0 0 0"
Icon="&#xf6b8;"
Sub="{DynamicResource useGlyphUIEffect}">
<ui:ToggleSwitch
IsOn="{Binding UseGlyphIcons}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:Card>
<!-- Settings color scheme --> <!-- Settings color scheme -->
<cc:Card <cc:Card
Title="{DynamicResource ColorScheme}" Title="{DynamicResource ColorScheme}"