Skip to content

Commit a35fb34

Browse files
committed
- 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
1 parent f07c09f commit a35fb34

File tree

4 files changed

+109
-101
lines changed

4 files changed

+109
-101
lines changed

Flow.Launcher/Resources/Controls/Card.xaml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,21 @@
2020
<Setter Property="BorderThickness" Value="1" />
2121
<Setter Property="CornerRadius" Value="5" />
2222
<Setter Property="MinHeight" Value="68" />
23-
<Setter Property="Padding" Value="0,15,0,15" />
24-
<Setter Property="Margin" Value="0,4,0,0" />
23+
<Setter Property="Padding" Value="0 15 0 15" />
24+
<Setter Property="Margin" Value="0 4 0 0" />
2525
<Setter Property="SnapsToDevicePixels" Value="True" />
2626
<Style.Triggers>
2727
<DataTrigger Binding="{Binding Type, RelativeSource={RelativeSource AncestorType=local:Card}}" Value="Inside">
28-
<Setter Property="BorderThickness" Value="0,1,0,0" />
28+
<Setter Property="BorderThickness" Value="0 1 0 0" />
2929
<Setter Property="CornerRadius" Value="0" />
30-
<Setter Property="Margin" Value="0,0,0,0" />
30+
<Setter Property="Margin" Value="0 0 0 0" />
3131
<Setter Property="Background" Value="Transparent" />
3232
</DataTrigger>
3333
<DataTrigger Binding="{Binding Type, RelativeSource={RelativeSource AncestorType=local:Card}}" Value="InsideFit">
34-
<Setter Property="BorderThickness" Value="0,1,0,0" />
34+
<Setter Property="BorderThickness" Value="0 1 0 0" />
3535
<Setter Property="CornerRadius" Value="0" />
36-
<Setter Property="Margin" Value="0,0,0,0" />
37-
<Setter Property="Padding" Value="38,0,26,0" />
36+
<Setter Property="Margin" Value="0 0 0 0" />
37+
<Setter Property="Padding" Value="35 0 26 0" />
3838
<Setter Property="Background" Value="Transparent" />
3939
</DataTrigger>
4040

@@ -73,7 +73,7 @@
7373
<ContentControl
7474
Grid.Row="0"
7575
Grid.Column="2"
76-
Margin="0,0,16,0"
76+
Margin="0 0 16 0"
7777
HorizontalAlignment="Right"
7878
VerticalAlignment="Center"
7979
Content="{TemplateBinding Content}" />
@@ -91,7 +91,7 @@
9191
<TextBlock.Style>
9292
<Style TargetType="{x:Type TextBlock}">
9393
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
94-
<Setter Property="Margin" Value="0,0,0,0" />
94+
<Setter Property="Margin" Value="0 0 0 0" />
9595
<Setter Property="TextWrapping" Value="Wrap" />
9696
<Setter Property="VerticalAlignment" Value="Center" />
9797
</Style>
@@ -107,8 +107,8 @@
107107
</Style.Triggers>
108108
<Setter Property="Foreground" Value="{DynamicResource Color04B}" />
109109
<Setter Property="FontSize" Value="12" />
110-
<Setter Property="Margin" Value="0,0,0,0" />
111-
<Setter Property="Padding" Value="0,0,24,0" />
110+
<Setter Property="Margin" Value="0 0 0 0" />
111+
<Setter Property="Padding" Value="0 0 24 0" />
112112
<Setter Property="TextWrapping" Value="WrapWithOverflow" />
113113
</Style>
114114
</TextBlock.Style>
@@ -120,11 +120,11 @@
120120
<Style TargetType="{x:Type TextBlock}">
121121
<Style.Triggers>
122122
<DataTrigger Binding="{Binding ElementName=ItemIcon, Path=Text}" Value="{x:Static sys:String.Empty}">
123-
<Setter Property="Margin" Value="24,0,0,0" />
123+
<Setter Property="Margin" Value="24 0 0 0" />
124124
</DataTrigger>
125125
</Style.Triggers>
126126
<Setter Property="Grid.Column" Value="0" />
127-
<Setter Property="Margin" Value="24,0,16,0" />
127+
<Setter Property="Margin" Value="24 0 16 0" />
128128
<Setter Property="VerticalAlignment" Value="Center" />
129129
<Setter Property="FontSize" Value="20" />
130130
<Setter Property="FontFamily" Value="/Resources/#Segoe Fluent Icons" />

Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public partial class SettingsPaneThemeViewModel : BaseModel
2424
public Settings Settings { get; }
2525
private readonly Theme _theme = Ioc.Default.GetRequiredService<Theme>();
2626

27-
public static string LinkHowToCreateTheme => @"https://flowlauncher.com/docs/#/how-to-create-a-theme";
27+
public static string LinkHowToCreateTheme => @"https://www.flowlauncher.com/theme-builder/";
2828
public static string LinkThemeGallery => "https://github.com/Flow-Launcher/Flow.Launcher/discussions/1438";
2929

3030
private List<Theme.ThemeData> _themes;

Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,29 +29,35 @@
2929
Text="{DynamicResource general}"
3030
TextAlignment="left" />
3131

32-
<cc:Card Title="{DynamicResource startFlowLauncherOnSystemStartup}" Icon="&#xe8fc;">
33-
<ui:ToggleSwitch
34-
IsOn="{Binding StartFlowLauncherOnSystemStartup}"
35-
OffContent="{DynamicResource disable}"
36-
OnContent="{DynamicResource enable}" />
37-
</cc:Card>
32+
<cc:CardGroup Margin="0 10 0 0">
3833

39-
<cc:Card Title="{DynamicResource useLogonTaskForStartup}" Sub="{DynamicResource useLogonTaskForStartupTooltip}">
40-
<ui:ToggleSwitch
41-
IsOn="{Binding UseLogonTaskForStartup}"
42-
OffContent="{DynamicResource disable}"
43-
OnContent="{DynamicResource enable}" />
44-
</cc:Card>
34+
<cc:Card Title="{DynamicResource startFlowLauncherOnSystemStartup}" Icon="&#xe8fc;">
35+
<ui:ToggleSwitch
36+
IsOn="{Binding StartFlowLauncherOnSystemStartup}"
37+
OffContent="{DynamicResource disable}"
38+
OnContent="{DynamicResource enable}" />
39+
</cc:Card>
4540

46-
<cc:Card
47-
Title="{DynamicResource hideOnStartup}"
48-
Icon="&#xed1a;"
49-
Sub="{DynamicResource hideOnStartupToolTip}">
50-
<ui:ToggleSwitch
51-
IsOn="{Binding Settings.HideOnStartup}"
52-
OffContent="{DynamicResource disable}"
53-
OnContent="{DynamicResource enable}" />
54-
</cc:Card>
41+
<cc:Card
42+
Title="{DynamicResource useLogonTaskForStartup}"
43+
Sub="{DynamicResource useLogonTaskForStartupTooltip}"
44+
Type="InsideFit">
45+
<ui:ToggleSwitch
46+
IsOn="{Binding UseLogonTaskForStartup}"
47+
OffContent="{DynamicResource disable}"
48+
OnContent="{DynamicResource enable}" />
49+
</cc:Card>
50+
51+
<cc:Card
52+
Title="{DynamicResource hideOnStartup}"
53+
Sub="{DynamicResource hideOnStartupToolTip}"
54+
Type="InsideFit">
55+
<ui:ToggleSwitch
56+
IsOn="{Binding Settings.HideOnStartup}"
57+
OffContent="{DynamicResource disable}"
58+
OnContent="{DynamicResource enable}" />
59+
</cc:Card>
60+
</cc:CardGroup>
5561

5662
<cc:Card Title="{DynamicResource hideFlowLauncherWhenLoseFocus}" Margin="0 14 0 0">
5763
<ui:ToggleSwitch

Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml

Lines changed: 68 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -500,62 +500,29 @@
500500
Uri="{Binding LinkThemeGallery}" />
501501

502502
<!-- Fixed size -->
503-
<cc:CardGroup Margin="0 20 0 0">
504-
<cc:Card
505-
Title="{DynamicResource KeepMaxResults}"
506-
Icon="&#xE744;"
507-
Sub="{DynamicResource KeepMaxResultsToolTip}">
508-
<ui:ToggleSwitch
509-
IsOn="{Binding KeepMaxResults}"
510-
OffContent="{DynamicResource disable}"
511-
OnContent="{DynamicResource enable}" />
512-
</cc:Card>
503+
<cc:ExCard
504+
Title="{DynamicResource KeepMaxResults}"
505+
Margin="0 20 0 0"
506+
Icon="&#xE744;"
507+
Sub="{DynamicResource KeepMaxResultsToolTip}">
508+
<cc:ExCard.SideContent>
509+
<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
510+
<ui:ToggleSwitch
511+
IsOn="{Binding KeepMaxResults}"
512+
OffContent="{DynamicResource disable}"
513+
OnContent="{DynamicResource enable}" />
514+
</StackPanel>
515+
</cc:ExCard.SideContent>
513516
<cc:Card
514517
Title="{DynamicResource maxShowResults}"
515-
Icon="&#xe8fd;"
516518
Sub="{DynamicResource maxShowResultsToolTip}"
517-
Visibility="{Binding KeepMaxResults, Converter={StaticResource BoolToVisibilityConverter}}">
519+
Type="InsideFit">
518520
<ComboBox
519521
Width="100"
520522
ItemsSource="{Binding MaxResultsRange}"
521523
SelectedItem="{Binding Settings.MaxResultsToShow}" />
522524
</cc:Card>
523-
</cc:CardGroup>
524-
525-
<!-- Fonts and icons -->
526-
<cc:Card
527-
Title="{DynamicResource useGlyphUI}"
528-
Margin="0 14 0 0"
529-
Icon="&#xf6b8;"
530-
Sub="{DynamicResource useGlyphUIEffect}">
531-
<ui:ToggleSwitch
532-
IsOn="{Binding UseGlyphIcons}"
533-
OffContent="{DynamicResource disable}"
534-
OnContent="{DynamicResource enable}" />
535-
</cc:Card>
536-
537-
<!-- Placeholder text -->
538-
<cc:CardGroup Margin="0 14 0 0">
539-
<cc:Card
540-
Title="{DynamicResource ShowPlaceholder}"
541-
Icon="&#xE82F;"
542-
Sub="{DynamicResource ShowPlaceholderTip}">
543-
<ui:ToggleSwitch
544-
IsOn="{Binding ShowPlaceholder}"
545-
OffContent="{DynamicResource disable}"
546-
OnContent="{DynamicResource enable}" />
547-
</cc:Card>
548-
549-
<cc:Card
550-
Title="{DynamicResource PlaceholderText}"
551-
Icon="&#xED59;"
552-
Sub="{Binding PlaceholderTextTip}">
553-
<TextBox
554-
MinWidth="150"
555-
Text="{Binding PlaceholderText}"
556-
TextWrapping="NoWrap" />
557-
</cc:Card>
558-
</cc:CardGroup>
525+
</cc:ExCard>
559526

560527
<!-- Time and date -->
561528
<cc:CardGroup Margin="0 14 0 0">
@@ -602,22 +569,45 @@
602569
</cc:Card>
603570
</cc:CardGroup>
604571

605-
<!-- Animation -->
606-
<cc:CardGroup Margin="0 14 0 0">
572+
<!-- Placeholder text -->
573+
<cc:ExCard
574+
Title="{DynamicResource ShowPlaceholder}"
575+
Margin="0 4 0 0"
576+
Icon="&#xea80;"
577+
Sub="{DynamicResource ShowPlaceholderTip}">
578+
<cc:ExCard.SideContent>
579+
<ui:ToggleSwitch
580+
IsOn="{Binding ShowPlaceholder}"
581+
OffContent="{DynamicResource disable}"
582+
OnContent="{DynamicResource enable}" />
583+
</cc:ExCard.SideContent>
607584
<cc:Card
608-
Title="{DynamicResource Animation}"
609-
Icon="&#xedb5;"
610-
Sub="{DynamicResource AnimationTip}">
585+
Title="{DynamicResource PlaceholderText}"
586+
Sub="{Binding PlaceholderTextTip}"
587+
Type="InsideFit">
588+
<TextBox
589+
MinWidth="150"
590+
Text="{Binding PlaceholderText}"
591+
TextWrapping="NoWrap" />
592+
</cc:Card>
593+
</cc:ExCard>
594+
595+
<!-- Animation -->
596+
<cc:ExCard
597+
Title="{DynamicResource Animation}"
598+
Margin="0 18 0 0"
599+
Icon="&#xedb5;"
600+
Sub="{DynamicResource AnimationTip}">
601+
<cc:ExCard.SideContent>
611602
<ui:ToggleSwitch
612603
IsOn="{Binding UseAnimation}"
613604
OffContent="{DynamicResource disable}"
614605
OnContent="{DynamicResource enable}" />
615-
</cc:Card>
606+
</cc:ExCard.SideContent>
616607
<cc:Card
617608
Title="{DynamicResource AnimationSpeed}"
618-
Icon="&#xe916;"
619609
Sub="{DynamicResource AnimationSpeedTip}"
620-
Visibility="{Binding UseAnimation, Converter={StaticResource BoolToVisibilityConverter}}">
610+
Type="InsideFit">
621611
<StackPanel Orientation="Horizontal">
622612
<ComboBox
623613
MinWidth="160"
@@ -637,25 +627,25 @@
637627
IsEqualTo={x:Static userSettings:AnimationSpeeds.Custom}}" />
638628
</StackPanel>
639629
</cc:Card>
640-
</cc:CardGroup>
630+
</cc:ExCard>
641631

642632
<!-- SFX -->
643-
<cc:CardGroup Margin="0 14 0 0">
644-
<cc:Card
645-
Title="{DynamicResource SoundEffect}"
646-
Icon="&#xe7f5;"
647-
Sub="{DynamicResource SoundEffectTip}">
633+
<cc:ExCard
634+
Title="{DynamicResource SoundEffect}"
635+
Margin="0 4 0 0"
636+
Icon="&#xe7f5;"
637+
Sub="{DynamicResource SoundEffectTip}">
638+
<cc:ExCard.SideContent>
648639
<ui:ToggleSwitch
649640
IsOn="{Binding UseSound}"
650641
OffContent="{DynamicResource disable}"
651642
OnContent="{DynamicResource enable}" />
652-
</cc:Card>
643+
</cc:ExCard.SideContent>
653644
<cc:Card
654645
Title="{DynamicResource SoundEffectVolume}"
655-
Icon="&#xe994;"
656646
IsEnabled="{Binding EnableVolumeAdjustment}"
657647
Sub="{DynamicResource SoundEffectVolumeTip}"
658-
Visibility="{Binding UseSound, Converter={StaticResource BoolToVisibilityConverter}}">
648+
Type="InsideFit">
659649
<StackPanel Orientation="Horizontal">
660650
<TextBlock
661651
Margin="0 0 8 0"
@@ -672,7 +662,7 @@
672662
Value="{Binding SoundEffectVolume}" />
673663
</StackPanel>
674664
</cc:Card>
675-
</cc:CardGroup>
665+
</cc:ExCard>
676666
<Border
677667
Name="WMPWarning"
678668
Padding="0 10"
@@ -708,6 +698,18 @@
708698
</Grid>
709699
</Border>
710700

701+
702+
<!-- Fonts and icons -->
703+
<cc:Card
704+
Title="{DynamicResource useGlyphUI}"
705+
Margin="0 0 0 0"
706+
Icon="&#xf6b8;"
707+
Sub="{DynamicResource useGlyphUIEffect}">
708+
<ui:ToggleSwitch
709+
IsOn="{Binding UseGlyphIcons}"
710+
OffContent="{DynamicResource disable}"
711+
OnContent="{DynamicResource enable}" />
712+
</cc:Card>
711713
<!-- Settings color scheme -->
712714
<cc:Card
713715
Title="{DynamicResource ColorScheme}"

0 commit comments

Comments
 (0)