Skip to content
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

Release 1.20.0 | Plugin 4.5.0 #3269

Draft
wants to merge 776 commits into
base: master
Choose a base branch
from
Draft
Changes from 2 commits
Commits
Show all changes
776 commits
Select commit Hold shift + click to select a range
8408a3c
Bump System.Data.OleDb from 8.0.1 to 9.0.2
dependabot[bot] Mar 9, 2025
aca6893
Merge pull request #3325 from Flow-Launcher/dependabot/nuget/System.D…
Jack251970 Mar 9, 2025
869fe5f
Revert "Bump System.Data.OleDb from 8.0.1 to 9.0.2"
Jack251970 Mar 10, 2025
36e10a1
Merge pull request #3328 from Jack251970/nuget_package
jjw24 Mar 10, 2025
4fd5e15
- Adjust Setting order
onesounds Mar 11, 2025
1c79d51
Fix Change Theme render timing
onesounds Mar 11, 2025
ba02a3c
Add Strings
onesounds Mar 11, 2025
e870dd2
Allow log level selection
VictoriousRaptor May 29, 2024
44a90e5
Write log level in log
VictoriousRaptor Mar 11, 2025
1dfa15d
Bump Microsoft.Data.Sqlite from 9.0.2 to 9.0.3
dependabot[bot] Mar 11, 2025
8d3fd75
Add getter and setter
VictoriousRaptor Mar 12, 2025
68afe86
Merge pull request #3333 from Flow-Launcher/dependabot/nuget/Microsof…
Jack251970 Mar 12, 2025
3fe52f9
Merge branch 'dev' into debug-log-level
Jack251970 Mar 12, 2025
11acca6
Move log level to enum & Use info level as default
Jack251970 Mar 12, 2025
05ff797
Use one function to set log level
Jack251970 Mar 12, 2025
66bf046
Add log level change to general settings page
Jack251970 Mar 12, 2025
a2372d8
Merge branch 'dev' into flow-theme-selector-plugin
Jack251970 Mar 12, 2025
b2dc128
Use dependency injection to fix issue
Jack251970 Mar 12, 2025
59fbef1
Use public current theme
Jack251970 Mar 12, 2025
9395b89
Make default score larger
Jack251970 Mar 12, 2025
468c0b2
Change ico & glyph
Jack251970 Mar 12, 2025
f4b074c
Fix shadow effec tissue
onesounds Mar 12, 2025
ea5b3f1
Disable backdrop control when use non-blur theme
onesounds Mar 12, 2025
9b2148f
Merge pull request #2739 from Flow-Launcher/debug-log-level
VictoriousRaptor Mar 12, 2025
bad304b
Query themes every time
Jack251970 Mar 12, 2025
94774b2
Requery and do not close window
Jack251970 Mar 12, 2025
d099a39
Fix theme change drop shadow effect issue & Add theme description
Jack251970 Mar 12, 2025
b2f8ad9
Fix null exception
Odotocodot Mar 12, 2025
84cd1a8
Remove extra code
Odotocodot Mar 12, 2025
f503e41
Merge branch 'dev' into flow-theme-selector-plugin
Odotocodot Mar 12, 2025
59b4859
Merge pull request #2448 from Odotocodot/flow-theme-selector-plugin
Jack251970 Mar 13, 2025
aabe967
Adjust Dropshadow control disable
onesounds Mar 13, 2025
ec5d52e
Fix Preview background
onesounds Mar 13, 2025
e8be131
Move log level to about page
Jack251970 Mar 13, 2025
72d2b7e
Change default pending color
onesounds Mar 13, 2025
f24d64a
Add log level glyph
Jack251970 Mar 13, 2025
f96d88f
Fix strings
Jack251970 Mar 13, 2025
424b575
Merge pull request #3342 from Jack251970/log_level_card
Jack251970 Mar 13, 2025
73c5f39
Merge Dev
onesounds Mar 13, 2025
dd1f439
Adjust strings and icon
onesounds Mar 13, 2025
6c1730e
Merge Dev
onesounds Mar 13, 2025
db5bc41
Merge branch 'dev' into processkiller_orderby_windowtitle
Jack251970 Mar 13, 2025
88f8274
Remove duplicated strings
onesounds Mar 13, 2025
fa46513
Use PInvoke to replace DllImport
Jack251970 Mar 13, 2025
b7694d3
Clean up codes
Jack251970 Mar 13, 2025
d12cde7
Do not close window when killed processes
Jack251970 Mar 13, 2025
7868703
Merge branch 'dev' into welcome_backspace_issue
Jack251970 Mar 13, 2025
9b28161
Merge pull request #3310 from Jack251970/welcome_backspace_issue
jjw24 Mar 13, 2025
bc0cde2
Add translations for system plugin command column
Jack251970 Mar 13, 2025
01e8be7
Fix FL settings issue
Jack251970 Mar 13, 2025
8335821
Clean up codes
Jack251970 Mar 13, 2025
e0f02a0
Initialize localized grid & Edit button
Jack251970 Mar 13, 2025
2a5b22b
Add command keyword change dialog & Support culture change
Jack251970 Mar 13, 2025
e196d7c
Improve keyword search
Jack251970 Mar 13, 2025
0f279df
Add title & subtitle search
Jack251970 Mar 13, 2025
2cd769b
Fix UI thread issue and preview
onesounds Mar 14, 2025
6bc69b1
Do not allow kill FL process
Jack251970 Mar 14, 2025
8ee2d48
Use score bump & Search window title
Jack251970 Mar 14, 2025
c7a2dee
Fix Keeping shadow when change page issue
onesounds Mar 14, 2025
caa5a48
Use enum instead of constants & Use vm property
Jack251970 Mar 14, 2025
8484c2b
Fix color scheme change issue & Code cleanup
Jack251970 Mar 14, 2025
c17dcad
Revert "Use enum instead of constants"
Jack251970 Mar 14, 2025
ab3cd8a
Use largest score from title & subtitle & keyword
Jack251970 Mar 14, 2025
f25c5b9
Improve code quality & Use progress name and id as title tooltip
Jack251970 Mar 14, 2025
aa6c9d9
Use string builder
Jack251970 Mar 14, 2025
57d206f
Fix SystemBG color select
onesounds Mar 14, 2025
887be64
Merge branch '250223FluentTest2' of https://github.com/onesounds/Flow…
onesounds Mar 14, 2025
e527e6c
Fix Backdrop reset when change theme
onesounds Mar 14, 2025
ecebf17
New Crowdin updates (#3186)
jjw24 Mar 14, 2025
9c1ff85
Merge branch 'dev' into ProgressBarDispatcher
Jack251970 Mar 14, 2025
fd344a3
Fix Preview border
onesounds Mar 14, 2025
c28a37a
Fix build issue
Jack251970 Mar 14, 2025
5d2778a
Code cleanup
Jack251970 Mar 14, 2025
e862b38
Cleanup PendingLineStyle
Jack251970 Mar 14, 2025
4e15cb0
Comment cleanup
onesounds Mar 15, 2025
d90b82a
Code Cleanup
onesounds Mar 15, 2025
6013229
Update all dependencies to Fody 6.5.5
VictoriousRaptor Mar 15, 2025
7c8d45d
- Fix Clock Right margin
onesounds Mar 15, 2025
aeb3f22
- rollback pin theme to legacy
onesounds Mar 15, 2025
4bb8bff
Merge pull request #3349 from Flow-Launcher/fody-6.5.5
VictoriousRaptor Mar 15, 2025
9b60eac
Code cleanup
Jack251970 Mar 15, 2025
53d647f
Adjust Themes for fluent
onesounds Mar 16, 2025
9ec6d5c
Fix clock visibilty when open context menu
onesounds Mar 16, 2025
fa5bfd3
Fix BlurWhite theme
onesounds Mar 16, 2025
ce55303
- Fix Logic for dwmBG
onesounds Mar 16, 2025
c34fd63
Merge pull request #3311 from Jack251970/remove_panel_data
Jack251970 Mar 16, 2025
0086a9e
Add a condition to disable blur on unsupported Windows versions.
onesounds Mar 16, 2025
c792544
Adjust UI
onesounds Mar 16, 2025
a98b7b7
Merge branch 'dev' into 250223FluentTest2
Jack251970 Mar 16, 2025
29c6f12
Code cleanup
Jack251970 Mar 16, 2025
82af6ab
Merge pull request #3344 from Jack251970/system_plugin_translation
Jack251970 Mar 16, 2025
07b0e72
Code cleanup
Jack251970 Mar 16, 2025
e4ade45
Use PInvoke.DwmSetWindowAttribute instead of DllImport
Jack251970 Mar 16, 2025
db37ab7
Use PInvoke.DwmSetWindowAttribute instead of DllImport
Jack251970 Mar 16, 2025
7a85439
Improve code quality
Jack251970 Mar 16, 2025
2dcbe7f
Remove old blur handling codes
Jack251970 Mar 16, 2025
200c32b
Code cleanup
Jack251970 Mar 16, 2025
cff400b
Revert main window xaml change
Jack251970 Mar 16, 2025
7c23aeb
Improve code quality
Jack251970 Mar 16, 2025
07c5fa4
Improve code quality
Jack251970 Mar 16, 2025
2ed5de3
Improve sys plugin theme selector
Jack251970 Mar 16, 2025
cd46c79
Fix build issue
Jack251970 Mar 16, 2025
9a6175e
Remove useless position initialization & Remove useless dispatcher in…
Jack251970 Mar 16, 2025
eb2a24d
Merge pull request #1445 from Sparrkle/ProgressBarDispatcher
Jack251970 Mar 16, 2025
6f093cf
Merge branch 'dev' into 250223FluentTest2
Jack251970 Mar 16, 2025
3966290
Refresh frame after position is intialized
Jack251970 Mar 16, 2025
2ea303f
Code cleanup
Jack251970 Mar 16, 2025
70e7f82
Fix Blink
onesounds Mar 16, 2025
ecc9f0d
Fix acrylic backdrop flicker issue
Jack251970 Mar 16, 2025
09d66f5
Merge branch '250223FluentTest2' of https://github.com/onesounds/Flow…
onesounds Mar 16, 2025
8b10973
Revert "Fix Blink"
Jack251970 Mar 16, 2025
1ca17aa
Code cleanup
Jack251970 Mar 16, 2025
1baf175
Merge branch 'dev' into settings_panel
Jack251970 Mar 16, 2025
6c80e74
Fix websearch plugin issue & Improve sys plugin settings panel
Jack251970 Mar 16, 2025
fcd7e55
Change string resources
Jack251970 Mar 16, 2025
2cd1683
Improve code quality
Jack251970 Mar 16, 2025
a98a033
Improve code quality
Jack251970 Mar 16, 2025
7d62ded
Improve code quality
Jack251970 Mar 16, 2025
49f1d79
Fix SetWindowLong issue
Jack251970 Mar 16, 2025
bf5591c
Fix position set issue
Jack251970 Mar 16, 2025
0bcc187
Keep user settings when changing theme
Jack251970 Mar 16, 2025
2b6e1bf
Improve code quality
Jack251970 Mar 17, 2025
da30e2e
Improve code quality
Jack251970 Mar 17, 2025
a2f70f4
Organize usings
Jack251970 Mar 17, 2025
1e6bbdd
Organize usings
Jack251970 Mar 17, 2025
698217f
Improve code quality
Jack251970 Mar 17, 2025
4d080a9
Fix build issue
Jack251970 Mar 17, 2025
b1ec0bd
Fix custom query hotkey settings issue
Jack251970 Mar 17, 2025
2c5fcf7
Add hotkey control type & format xaml
Jack251970 Mar 17, 2025
43bf634
Improve area text box
Jack251970 Mar 17, 2025
afb38db
Fix possible null reference exception
Jack251970 Mar 17, 2025
0f3f97a
fix typo
jjw24 Mar 17, 2025
83c7ee1
Change type name & Add comments
Jack251970 Mar 17, 2025
497ac91
Add None hotkey type
Jack251970 Mar 17, 2025
9d1e305
Merge pull request #3354 from Jack251970/fix_custom_hotkey
Jack251970 Mar 17, 2025
841cc06
Fix blink clock/icon animation issue when show/hide repeatly
onesounds Mar 17, 2025
f3a5365
Merge remote-tracking branch 'origin/250223FluentTest2' into 250223Fl…
onesounds Mar 17, 2025
0741231
Adjust Flickering code
onesounds Mar 17, 2025
95f151b
Organize usings
Jack251970 Mar 17, 2025
711865d
Use local variable for storyboard
Jack251970 Mar 17, 2025
7876fa1
Fix possible cancel token issue
Jack251970 Mar 17, 2025
570d9ce
Remove useless logic
Jack251970 Mar 17, 2025
bfa7622
Improve performance
Jack251970 Mar 17, 2025
df8f2f0
Merge branch 'dev' into 250223FluentTest2
Jack251970 Mar 17, 2025
044dc2c
Fix hotkey initialization issue
Jack251970 Mar 18, 2025
e28a69c
Merge pull request #3357 from Jack251970/fix_custom_hotkey1
Jack251970 Mar 18, 2025
8493fa5
Merge branch 'dev' into 250223FluentTest2
Jack251970 Mar 18, 2025
a3322fc
Remove Corner Type
onesounds Mar 18, 2025
4731d88
Removed window animation storyboard
onesounds Mar 18, 2025
aaca0c0
Change Comment to english
onesounds Mar 18, 2025
9cb31c8
Improve code quality
Jack251970 Mar 19, 2025
944393c
Improve code quality
Jack251970 Mar 19, 2025
5252d3e
Merge pull request #3271 from onesounds/250223FluentTest2
onesounds Mar 20, 2025
87f765b
Merge pull request #3261 from Jack251970/multiple_keywords
Jack251970 Mar 20, 2025
444d295
Update Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs
Jack251970 Mar 20, 2025
f14e79d
Update Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs
Jack251970 Mar 20, 2025
ffc5047
Update Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs
Jack251970 Mar 20, 2025
1d625c9
Update Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs
Jack251970 Mar 20, 2025
13fcdc6
Fix typo 'seperator'
Jack251970 Mar 20, 2025
782c11c
Update Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs
Jack251970 Mar 20, 2025
f7d099d
Fix wpf drawing issue
onesounds Mar 20, 2025
f6b9d7e
Fix Comment
onesounds Mar 20, 2025
288808a
Merge pull request #3362 from onesounds/250320-FixTabControlExplorer
onesounds Mar 20, 2025
e5298d3
Revert "ExplorerSettings.xaml"
Jack251970 Mar 20, 2025
a6812cf
Merge branch 'dev' into settings_panel
Jack251970 Mar 20, 2025
d533f53
Add global margin & Remove inner margin & Remove inner scroll viewer
Jack251970 Mar 20, 2025
3fee5ae
Redesign explorer settings panel
Jack251970 Mar 20, 2025
024bf64
Use trick for left alignment
Jack251970 Mar 20, 2025
ca0299e
Adjust margin
onesounds Mar 20, 2025
dda008f
Merge pull request #3265 from Jack251970/settings_panel
Jack251970 Mar 20, 2025
a160a78
Fix result update interface issue
Jack251970 Mar 21, 2025
b75066f
Fix change plugin language issue
Jack251970 Mar 21, 2025
1b066a5
Improve code quality
Jack251970 Mar 21, 2025
783cef6
Gracefully shutdown all threads when exiting
Jack251970 Mar 21, 2025
b71e722
Improve & Fix
Jack251970 Mar 21, 2025
81a4632
Implement auto-switching to English when the option is enabled
Yusyuriv Mar 21, 2025
5b29ded
Remove useless cancellation token source
Jack251970 Mar 22, 2025
09bc2bc
Cleanup & Improve
Jack251970 Mar 22, 2025
aa3ad10
When looking for English keyboard layout, use pre-defined IDs instead…
Yusyuriv Mar 22, 2025
4e5584b
Enable acrylic effect on first launch if running on Windows 11
onesounds Mar 22, 2025
023ab45
Use PInvoke instead of DllImport & Several adjustments
Jack251970 Mar 22, 2025
9d81e60
Improve dispose logic
Jack251970 Mar 22, 2025
48792b6
Restore style
Jack251970 Mar 22, 2025
adbef0d
Improve disposable interface for mainvm
Jack251970 Mar 22, 2025
93ccdee
Improve comments
Jack251970 Mar 22, 2025
465108a
Fix keyboard layout fetch issue
Jack251970 Mar 22, 2025
67be335
Rename methods to make their purpose more obvious; slight code style …
Yusyuriv Mar 22, 2025
8d0d19e
Merge pull request #3369 from onesounds/050322-ArcrylicFirstLaunch
onesounds Mar 22, 2025
c39079b
Revert accidental change
Yusyuriv Mar 22, 2025
4146f4d
Use focus events to trigger
Jack251970 Mar 22, 2025
f83e8ed
Revert "Use focus events to trigger"
Yusyuriv Mar 22, 2025
6ad4b23
Don't switch to English when IME can be disabled instead
Yusyuriv Mar 22, 2025
ca04823
Remove generic language code
Yusyuriv Mar 22, 2025
9167cba
Use selected item for binding preview properties & Code cleanup
Jack251970 Mar 22, 2025
b93faff
Code cleanup
Jack251970 Mar 22, 2025
26ab2ae
Revert to results selected item
Jack251970 Mar 22, 2025
f1bcfc1
Support preview panel for history
Jack251970 Mar 22, 2025
3c7b8cf
Force preview panel height
Jack251970 Mar 22, 2025
00ac327
Fix history visibility issue
Jack251970 Mar 22, 2025
655b017
Code quality
Jack251970 Mar 22, 2025
3e64a34
Update README.md
AleksandrSl Mar 22, 2025
839c26d
Merge pull request #3371 from AleksandrSl/patch-1
cibere Mar 22, 2025
e9f317f
Change variable names
Jack251970 Mar 23, 2025
017cc5a
Merge pull request #3365 from Jack251970/result_update_issue
Jack251970 Mar 23, 2025
0ef4b05
Add Initial state for QueryTextBoxCursorMovedToEnd
onesounds Mar 23, 2025
6fbde2f
Merge pull request #3374 from onesounds/050323_FixLastCaret
onesounds Mar 23, 2025
747f958
Fix keyboard restore issue when window is deactivated
Jack251970 Mar 23, 2025
cd28c09
Fix the issue with not being able to switch back to the original keyb…
Yusyuriv Mar 23, 2025
bf011f1
Revert "Fix keyboard restore issue when window is deactivated"
Yusyuriv Mar 23, 2025
382d0c2
Don't broadcast language change
Yusyuriv Mar 23, 2025
48aff32
Clarify why not switch keyboard layout for languages that have IME mode
Yusyuriv Mar 23, 2025
4df42a0
Add doc comments and additional error handling in keyboard layout swi…
Yusyuriv Mar 23, 2025
1bf5733
Fix incorrect error handling logic in keyboard layout change
Yusyuriv Mar 23, 2025
5be88dd
Remove blank line
Jack251970 Mar 23, 2025
c63debe
Add foreground window check
Jack251970 Mar 23, 2025
4fc7f70
Adjust formats
Jack251970 Mar 23, 2025
d827d0a
Use language tag instead of language id
Jack251970 Mar 23, 2025
4f2a951
Small code style changes in keyboard change logic
Yusyuriv Mar 23, 2025
ddec1bd
Merge pull request #3366 from Flow-Launcher/always-use-english
Yusyuriv Mar 23, 2025
dfad11c
Fix language change issue
Jack251970 Mar 24, 2025
a3193cf
Move function position
Jack251970 Mar 24, 2025
ec22f59
Fix Non Resource situation when change theme
onesounds Mar 24, 2025
a078777
- Fixed an issue where font settings were not applied when using the …
onesounds Mar 24, 2025
298af4d
Merge pull request #3376 from Jack251970/change_language
Jack251970 Mar 24, 2025
60a1e5e
Rollback about highlight value in themes.
onesounds Mar 24, 2025
2b67f5b
Avoid referencing _oldResource when it’s null
onesounds Mar 24, 2025
2af033b
Cleanup codes
Jack251970 Mar 24, 2025
d212e0e
Add code comments
Jack251970 Mar 24, 2025
07b73db
Add preview info for history results
Jack251970 Mar 25, 2025
835457d
Remove debug codes
Jack251970 Mar 25, 2025
3acfebc
Fix possible visibility issue
Jack251970 Mar 25, 2025
0d74048
Add control names
Jack251970 Mar 25, 2025
acf3a27
Improve code quality
Jack251970 Mar 26, 2025
8e5412f
Fix preview panel display when only enabling history
Jack251970 Mar 26, 2025
f7954a0
Clean debug codes
Jack251970 Mar 26, 2025
9741156
Improve code quality
Jack251970 Mar 26, 2025
d73980a
Merge branch 'dev' into history_preview1
Jack251970 Mar 26, 2025
334a27f
Merge branch 'dev' into graceful_shutdown
Jack251970 Mar 26, 2025
1d1909c
Fix results view update task dispose issue
Jack251970 Mar 26, 2025
e5ee856
Merge pull request #3367 from Jack251970/graceful_shutdown
Jack251970 Mar 26, 2025
66e42c1
Add control names
Jack251970 Mar 26, 2025
65f07d8
Fix preview sepatator issue
Jack251970 Mar 26, 2025
7c418a6
Merge pull request #3377 from onesounds/050322-FixFontSelectFunction
onesounds Mar 26, 2025
350276d
Merge pull request #3370 from Jack251970/history_preview1
Jack251970 Mar 26, 2025
0ddaea3
Merge branch 'dev' into processkiller_orderby_windowtitle
Jack251970 Mar 26, 2025
3f0641a
Add settings control
Jack251970 Mar 26, 2025
f2e5006
Code quality & Fix build issue
Jack251970 Mar 26, 2025
773fb8d
Merge pull request #3150 from PaulPSta/processkiller_orderby_windowtitle
Jack251970 Mar 26, 2025
8747442
Back to original action for UX
Jack251970 Mar 26, 2025
7c009d4
Merge pull request #3387 from Jack251970/restore_kill_process_action
Jack251970 Mar 26, 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
10 changes: 6 additions & 4 deletions Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using System;
using System.Windows.Navigation;
using System.Windows.Navigation;
using Flow.Launcher.Core;
using Flow.Launcher.SettingPages.ViewModels;
using Flow.Launcher.Infrastructure.UserSettings;
using CommunityToolkit.Mvvm.DependencyInjection;

namespace Flow.Launcher.SettingPages.Views;

@@ -12,8 +14,8 @@ protected override void OnNavigatedTo(NavigationEventArgs e)
{
if (!IsInitialized)
{
if (e.ExtraData is not SettingWindow.PaneData { Settings: { } settings, Updater: { } updater })
throw new ArgumentException("Settings are required for SettingsPaneAbout.");
var settings = Ioc.Default.GetRequiredService<Settings>();
var updater = Ioc.Default.GetRequiredService<Updater>();
_viewModel = new SettingsPaneAboutViewModel(settings, updater);
DataContext = _viewModel;
InitializeComponent();
11 changes: 7 additions & 4 deletions Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using System;
using System.Windows.Navigation;
using System.Windows.Navigation;
using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.Core;
using Flow.Launcher.Core.Configuration;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.SettingPages.ViewModels;

@@ -13,8 +15,9 @@ protected override void OnNavigatedTo(NavigationEventArgs e)
{
if (!IsInitialized)
{
if (e.ExtraData is not SettingWindow.PaneData { Settings: { } settings, Updater: {} updater, Portable: {} portable })
throw new ArgumentException("Settings, Updater and Portable are required for SettingsPaneGeneral.");
var settings = Ioc.Default.GetRequiredService<Settings>();
var updater = Ioc.Default.GetRequiredService<Updater>();
var portable = Ioc.Default.GetRequiredService<Portable>();
_viewModel = new SettingsPaneGeneralViewModel(settings, updater, portable);
DataContext = _viewModel;
InitializeComponent();
8 changes: 4 additions & 4 deletions Flow.Launcher/SettingPages/Views/SettingsPaneHotkey.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Windows.Navigation;
using System.Windows.Navigation;
using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.SettingPages.ViewModels;
using Flow.Launcher.Infrastructure.UserSettings;

namespace Flow.Launcher.SettingPages.Views;

@@ -12,8 +13,7 @@ protected override void OnNavigatedTo(NavigationEventArgs e)
{
if (!IsInitialized)
{
if (e.ExtraData is not SettingWindow.PaneData { Settings: { } settings })
throw new ArgumentException("Settings are required for SettingsPaneHotkey.");
var settings = Ioc.Default.GetRequiredService<Settings>();
_viewModel = new SettingsPaneHotkeyViewModel(settings);
DataContext = _viewModel;
InitializeComponent();
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
using System;
using System.ComponentModel;
using System.ComponentModel;
using System.Windows.Data;
using System.Windows.Input;
using System.Windows.Navigation;
using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.SettingPages.ViewModels;
using Flow.Launcher.ViewModel;
using Flow.Launcher.Infrastructure.UserSettings;

namespace Flow.Launcher.SettingPages.Views;

@@ -16,8 +17,7 @@ protected override void OnNavigatedTo(NavigationEventArgs e)
{
if (!IsInitialized)
{
if (e.ExtraData is not SettingWindow.PaneData { Settings: { } settings })
throw new ArgumentException($"Settings are required for {nameof(SettingsPanePluginStore)}.");
var settings = Ioc.Default.GetRequiredService<Settings>();
_viewModel = new SettingsPanePluginStoreViewModel();
DataContext = _viewModel;
InitializeComponent();
8 changes: 4 additions & 4 deletions Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
using System;
using System.Windows.Input;
using System.Windows.Input;
using System.Windows.Navigation;
using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.SettingPages.ViewModels;
using Flow.Launcher.Infrastructure.UserSettings;

namespace Flow.Launcher.SettingPages.Views;

@@ -13,8 +14,7 @@ protected override void OnNavigatedTo(NavigationEventArgs e)
{
if (!IsInitialized)
{
if (e.ExtraData is not SettingWindow.PaneData { Settings: { } settings })
throw new ArgumentException("Settings are required for SettingsPaneHotkey.");
var settings = Ioc.Default.GetRequiredService<Settings>();
_viewModel = new SettingsPanePluginsViewModel(settings);
DataContext = _viewModel;
InitializeComponent();
10 changes: 6 additions & 4 deletions Flow.Launcher/SettingPages/Views/SettingsPaneProxy.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using System;
using System.Windows.Navigation;
using System.Windows.Navigation;
using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.Core;
using Flow.Launcher.SettingPages.ViewModels;
using Flow.Launcher.Infrastructure.UserSettings;

namespace Flow.Launcher.SettingPages.Views;

@@ -12,8 +14,8 @@ protected override void OnNavigatedTo(NavigationEventArgs e)
{
if (!IsInitialized)
{
if (e.ExtraData is not SettingWindow.PaneData { Settings: { } settings, Updater: { } updater })
throw new ArgumentException($"Settings are required for {nameof(SettingsPaneProxy)}.");
var settings = Ioc.Default.GetRequiredService<Settings>();
var updater = Ioc.Default.GetRequiredService<Updater>();
_viewModel = new SettingsPaneProxyViewModel(settings, updater);
DataContext = _viewModel;
InitializeComponent();
10 changes: 4 additions & 6 deletions Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Controls;
using System.Windows.Navigation;
using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.SettingPages.ViewModels;
using Page = ModernWpf.Controls.Page;
using Flow.Launcher.Infrastructure.UserSettings;

namespace Flow.Launcher.SettingPages.Views;

@@ -16,8 +15,7 @@ protected override void OnNavigatedTo(NavigationEventArgs e)
{
if (!IsInitialized)
{
if (e.ExtraData is not SettingWindow.PaneData { Settings: { } settings })
throw new ArgumentException($"Settings are required for {nameof(SettingsPaneTheme)}.");
var settings = Ioc.Default.GetRequiredService<Settings>();
_viewModel = new SettingsPaneThemeViewModel(settings);
DataContext = _viewModel;
InitializeComponent();
13 changes: 2 additions & 11 deletions Flow.Launcher/SettingWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -4,8 +4,6 @@
using System.Windows.Input;
using System.Windows.Interop;
using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.Core;
using Flow.Launcher.Core.Configuration;
using Flow.Launcher.Helper;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
@@ -18,8 +16,6 @@ namespace Flow.Launcher;

public partial class SettingWindow
{
private readonly Updater _updater;
private readonly IPortable _portable;
private readonly IPublicAPI _api;
private readonly Settings _settings;
private readonly SettingWindowViewModel _viewModel;
@@ -30,8 +26,6 @@ public SettingWindow()
_settings = Ioc.Default.GetRequiredService<Settings>();
DataContext = viewModel;
_viewModel = viewModel;
_updater = Ioc.Default.GetRequiredService<Updater>();
_portable = Ioc.Default.GetRequiredService<Portable>();
_api = Ioc.Default.GetRequiredService<IPublicAPI>();
InitializePosition();
InitializeComponent();
@@ -166,10 +160,9 @@ private double WindowTop()

private void NavigationView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
{
var paneData = new PaneData(_settings, _updater, _portable);
if (args.IsSettingsSelected)
{
ContentFrame.Navigate(typeof(SettingsPaneGeneral), paneData);
ContentFrame.Navigate(typeof(SettingsPaneGeneral));
}
else
{
@@ -191,7 +184,7 @@ private void NavigationView_SelectionChanged(NavigationView sender, NavigationVi
nameof(About) => typeof(SettingsPaneAbout),
_ => typeof(SettingsPaneGeneral)
};
ContentFrame.Navigate(pageType, paneData);
ContentFrame.Navigate(pageType);
}
}

@@ -211,6 +204,4 @@ private void ContentFrame_Loaded(object sender, RoutedEventArgs e)
{
NavView.SelectedItem ??= NavView.MenuItems[0]; /* Set First Page */
}

public record PaneData(Settings Settings, Updater Updater, IPortable Portable);
}
Loading