Skip to content

Commit 20b0db3

Browse files
committed
- Change BlurAmount to Bool
- Adjust Theme List layout
1 parent f78521e commit 20b0db3

File tree

2 files changed

+27
-14
lines changed

2 files changed

+27
-14
lines changed

Flow.Launcher.Core/Resource/Theme.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,12 +262,12 @@ private ThemeData GetThemeDataFromPath(string path)
262262
)
263263
};
264264
}
265-
else if (line.StartsWith("BlurAmount:", StringComparison.OrdinalIgnoreCase))
265+
else if (line.StartsWith("IsBlur:", StringComparison.OrdinalIgnoreCase))
266266
{
267267
themeData = themeData with
268268
{
269-
BlurAmount = int.Parse(
270-
line.Remove(0, "BlurAmount:".Length).Trim()
269+
IsBlur = bool.Parse(
270+
line.Remove(0, "IsBlur:".Length).Trim()
271271
)
272272
};
273273
}
@@ -452,6 +452,6 @@ private void SetWindowAccent(Window w, AccentState state)
452452
}
453453
#endregion
454454

455-
public record ThemeData(string FileNameWithoutExtension, string Name, bool? IsDark = null, int? BlurAmount = null);
455+
public record ThemeData(string FileNameWithoutExtension, string Name, bool? IsDark = null, bool? IsBlur = null);
456456
}
457457
}

Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -467,16 +467,29 @@
467467
Width="Auto"
468468
Height="34"
469469
Margin="0">
470-
<TextBlock
471-
x:Name="ThemeName"
472-
Margin="0"
473-
Padding="14 12"
474-
HorizontalAlignment="Center"
475-
VerticalAlignment="Center"
476-
Focusable="True"
477-
FontSize="12"
478-
Text="{Binding Name}"
479-
TextWrapping="Wrap" />
470+
<StackPanel Margin="12 0" Orientation="Horizontal">
471+
<TextBlock
472+
x:Name="ThemeName"
473+
Margin="0 0 0 0"
474+
HorizontalAlignment="Center"
475+
VerticalAlignment="Center"
476+
FontSize="12"
477+
Text="{Binding Name}"
478+
TextWrapping="Wrap" />
479+
480+
<ui:FontIcon
481+
Margin="8 0 0 0"
482+
VerticalAlignment="Center"
483+
FontSize="12"
484+
Glyph="&#xED66;"
485+
Visibility="{Binding IsDark, Converter={StaticResource BoolToVisibilityConverter}}" />
486+
<ui:FontIcon
487+
Margin="8 0 0 0"
488+
VerticalAlignment="Center"
489+
FontSize="8"
490+
Glyph="&#xEB42;"
491+
Visibility="{Binding IsBlur, Converter={StaticResource BoolToVisibilityConverter}}" />
492+
</StackPanel>
480493
</Grid>
481494
</DataTemplate>
482495
</ListBox.ItemTemplate>

0 commit comments

Comments
 (0)