Skip to content

Improve Setting Window Font & Format xaml styles & Fix log message & Improve code quality #3487

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
f50f2ff
Implement dynamic font settings for the setting window
onesounds Apr 24, 2025
25f39f6
Add dynamic font support for the setting window
onesounds Apr 24, 2025
8432fa3
Add SettingWindowFont definition to CustomControlTemplate
onesounds Apr 24, 2025
02252c2
Add SettingWindowFont to CustomControlTemplate for improved font styling
onesounds Apr 24, 2025
2d1e9ec
Add ContentControlThemeFontFamily to support dynamic font styling
onesounds Apr 24, 2025
82f23e5
Update ContentControlThemeFontFamily when setting changes
Jack251970 Apr 24, 2025
d867875
Format xaml styles
Jack251970 Apr 24, 2025
d01c67f
Improve code quality
Jack251970 Apr 24, 2025
94ff72c
Check startup only for Release
Jack251970 Apr 24, 2025
4df9c04
Update dynamic resource earilier
Jack251970 Apr 24, 2025
71ab7a6
Fix log message & Improve code comments
Jack251970 Apr 24, 2025
8912789
Use http client for code quality
Jack251970 Apr 24, 2025
8463304
Fix clock panel font issue & Improve preview performance & Improve co…
Jack251970 Apr 24, 2025
82d97fd
Improve code quality
Jack251970 Apr 24, 2025
686d106
Add todo
Jack251970 Apr 24, 2025
192e2ef
Remove property change
Jack251970 Apr 24, 2025
22fb5b1
Remove unused binding
Jack251970 Apr 24, 2025
cbcebad
Improve code quality
Jack251970 Apr 24, 2025
84b0393
Use dependency injection for setting page view models
Jack251970 Apr 24, 2025
7945292
Update context menu font when setting is changed
Jack251970 Apr 24, 2025
5665758
Add property change back
Jack251970 Apr 24, 2025
197e9c4
Improve code comments
Jack251970 Apr 25, 2025
e3573f3
Improve code quality
Jack251970 Apr 25, 2025
856346a
Always update main window position when window is loaded
Jack251970 Apr 25, 2025
defb283
Change setting window position & window state faster & Do not save se…
Jack251970 Apr 25, 2025
f0512d7
Add blank line
Jack251970 Apr 25, 2025
755ddb4
Fix typo
Jack251970 Apr 25, 2025
c35eca2
Fix logon task issue message box & Improve startup path check
Jack251970 Apr 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Flow.Launcher.Infrastructure/UserSettings/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.ObjectModel;
using System.Text.Json.Serialization;
using System.Windows;
using System.Windows.Media;
using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.Infrastructure.Hotkey;
using Flow.Launcher.Infrastructure.Logger;
Expand Down Expand Up @@ -113,6 +114,7 @@ public string SettingWindowFont
{
_settingWindowFont = value;
OnPropertyChanged();
Application.Current.Resources["SettingWindowFont"] = new FontFamily(value);
}
}
}
Expand Down
1 change: 0 additions & 1 deletion Flow.Launcher/CustomQueryHotkeySetting.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
Width="530"
Background="{DynamicResource PopuBGColor}"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
FontFamily="{Binding Settings.SettingWindowFont, Mode=TwoWay}"
Foreground="{DynamicResource PopupTextColor}"
Icon="Images\app.png"
MouseDown="window_MouseDown"
Expand Down
1 change: 0 additions & 1 deletion Flow.Launcher/CustomShortcutSetting.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
Width="530"
Background="{DynamicResource PopuBGColor}"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
FontFamily="{Binding Settings.SettingWindowFont, Mode=TwoWay}"
Foreground="{DynamicResource PopupTextColor}"
Icon="Images\app.png"
ResizeMode="NoResize"
Expand Down
2 changes: 1 addition & 1 deletion Flow.Launcher/Languages/en.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@
<system:String x:Key="logLevel">Log Level</system:String>
<system:String x:Key="LogLevelDEBUG">Debug</system:String>
<system:String x:Key="LogLevelINFO">Info</system:String>
<system:String x:Key="settingWindowFont">Setting Window Font</system:String>
<system:String x:Key="settingWindowFontTitle">Setting Window Font</system:String>

<!-- FileManager Setting Dialog -->
<system:String x:Key="fileManagerWindow">Select File Manager</system:String>
Expand Down
14 changes: 14 additions & 0 deletions Flow.Launcher/Resources/CustomControlTemplate.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@
xmlns:system="clr-namespace:System;assembly=mscorlib"
xmlns:ui="http://schemas.modernwpf.com/2019">

<!-- Setting Window Font -->
<Style TargetType="ui:FontIcon">
<Setter Property="FontFamily" Value="/Resources/#Segoe Fluent Icons" />
</Style>
<Style TargetType="Control">
<Setter Property="FontFamily" Value="{DynamicResource SettingWindowFont}" />
</Style>
<Style TargetType="TextBlock">
<Setter Property="FontFamily" Value="{DynamicResource SettingWindowFont}" />
</Style>
<Style TargetType="Window">
<Setter Property="FontFamily" Value="{DynamicResource SettingWindowFont}" />
</Style>

<ContextMenu x:Key="TextBoxContextMenu">
<MenuItem Command="ApplicationCommands.Cut" Header="{DynamicResource cut}">
<MenuItem.Icon>
Expand Down
1 change: 1 addition & 0 deletions Flow.Launcher/Resources/SettingWindowStyle.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter" />
<converters:TextConverter x:Key="TextConverter" />
<core:TranslationConverter x:Key="TranslationConverter" />
<FontFamily x:Key="SettingWindowFont">Segoe UI</FontFamily>

<!-- Icon for Theme Type Label -->
<Geometry x:Key="circle_half_stroke_solid">F1 M512,512z M0,0z M448,256C448,150,362,64,256,64L256,448C362,448,448,362,448,256z M0,256A256,256,0,1,1,512,256A256,256,0,1,1,0,256z</Geometry>
Expand Down
1 change: 0 additions & 1 deletion Flow.Launcher/SelectBrowserWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
Width="550"
Background="{DynamicResource PopuBGColor}"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
FontFamily="{Binding Settings.SettingWindowFont, Mode=TwoWay}"
Foreground="{DynamicResource PopupTextColor}"
ResizeMode="NoResize"
SizeToContent="Height"
Expand Down
1 change: 0 additions & 1 deletion Flow.Launcher/SelectFileManagerWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
Width="600"
Background="{DynamicResource PopuBGColor}"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
FontFamily="{Binding Settings.SettingWindowFont, Mode=TwoWay}"
Foreground="{DynamicResource PopupTextColor}"
ResizeMode="NoResize"
SizeToContent="Height"
Expand Down
8 changes: 3 additions & 5 deletions Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,8 @@
Margin="0 0 12 0"
Command="{Binding AskClearLogFolderConfirmationCommand}"
Content="{Binding LogFolderSize, Mode=OneWay}" />
<Button
Content="&#xec7a;"
FontFamily="/Resources/#Segoe Fluent Icons"
FontSize="20">
<Button>
<ui:FontIcon FontSize="20" Glyph="&#xec7a;" />
<ui:FlyoutService.Flyout>
<ui:MenuFlyout>
<MenuItem Command="{Binding OpenWelcomeWindowCommand}" Header="{DynamicResource welcomewindow}">
Expand Down Expand Up @@ -148,7 +146,7 @@
SelectedValuePath="Value" />
</cc:Card>
<cc:Card
Title="{DynamicResource settingWindowFont}"
Title="{DynamicResource settingWindowFontTitle}"
Icon="&#xf259;"
Type="Inside">
<StackPanel Orientation="Horizontal">
Expand Down
6 changes: 3 additions & 3 deletions Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@
Margin="0 0 20 0"
Command="{Binding OpenHelperCommand}"
CommandParameter="{Binding RelativeSource={RelativeSource Self}}"
Content="&#xe9ce;"
FontFamily="{DynamicResource SymbolThemeFontFamily}"
FontSize="14" />
FontSize="14">
<ui:FontIcon FontSize="14" Glyph="&#xe9ce;" />
</Button>
<TextBox
Name="PluginFilterTextbox"
Width="150"
Expand Down
1 change: 0 additions & 1 deletion Flow.Launcher/SettingWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
MinHeight="600"
d:DataContext="{d:DesignInstance vm:SettingWindowViewModel}"
Closed="OnClosed"
FontFamily="{Binding Settings.SettingWindowFont, Mode=TwoWay}"
Icon="Images\app.ico"
Left="{Binding SettingWindowLeft, Mode=TwoWay}"
Loaded="OnLoaded"
Expand Down
14 changes: 6 additions & 8 deletions Flow.Launcher/WelcomeWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,21 +140,19 @@
Height="40"
Margin="8 5 0 5"
Click="ForwardButton_Click"
Content="&#xe76c;"
DockPanel.Dock="Right"
FontFamily="/Resources/#Segoe Fluent Icons"
FontSize="18"
IsEnabled="{Binding NextEnabled, Mode=OneWay}" />
IsEnabled="{Binding NextEnabled, Mode=OneWay}">
<ui:FontIcon FontSize="18" Glyph="&#xe76c;" />
</Button>
<Button
x:Name="BackButton"
Width="40"
Height="40"
Click="BackwardButton_Click"
Content="&#xe76b;"
DockPanel.Dock="Right"
FontFamily="/Resources/#Segoe Fluent Icons"
FontSize="18"
IsEnabled="{Binding BackEnabled, Mode=OneWay}" />
IsEnabled="{Binding BackEnabled, Mode=OneWay}">
<ui:FontIcon FontSize="18" Glyph="&#xe76b;" />
</Button>
<StackPanel />
</DockPanel>

Expand Down
Loading