mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
- Add PreviewHotkey property to HotkeySettingsViewModel
- Add preview hotkey UI to HotkeySettingsPage
- Implement dynamic hotkey handling in MainWindow code-behind
- Remove hardcoded F1 keybinding from XAML
- Update AVALONIA_MIGRATION_CHECKLIST.md with accurate progress:
- Overall progress: 60-65% (was 35-40%)
- Plugin Store: 95% done (was 0%)
- Plugin Settings: 90% done (was 33%)
- Proxy Settings: 100% done (was 59%)
💘 Generated with Crush
Assisted-by: Kimi for Coding via Crush <crush@charm.land>
44 lines
1 KiB
C#
44 lines
1 KiB
C#
using CommunityToolkit.Mvvm.ComponentModel;
|
|
using CommunityToolkit.Mvvm.DependencyInjection;
|
|
using Flow.Launcher.Infrastructure.UserSettings;
|
|
using Flow.Launcher.Avalonia.Helper;
|
|
using System;
|
|
|
|
namespace Flow.Launcher.Avalonia.ViewModel.SettingPages;
|
|
|
|
public partial class HotkeySettingsViewModel : ObservableObject
|
|
{
|
|
private readonly Settings _settings;
|
|
|
|
public HotkeySettingsViewModel()
|
|
{
|
|
_settings = Ioc.Default.GetRequiredService<Settings>();
|
|
}
|
|
|
|
public string ToggleHotkey
|
|
{
|
|
get => _settings.Hotkey;
|
|
set
|
|
{
|
|
if (_settings.Hotkey != value)
|
|
{
|
|
_settings.Hotkey = value;
|
|
HotKeyMapper.SetToggleHotkey(value);
|
|
OnPropertyChanged();
|
|
}
|
|
}
|
|
}
|
|
|
|
public string PreviewHotkey
|
|
{
|
|
get => _settings.PreviewHotkey;
|
|
set
|
|
{
|
|
if (_settings.PreviewHotkey != value)
|
|
{
|
|
_settings.PreviewHotkey = value;
|
|
OnPropertyChanged();
|
|
}
|
|
}
|
|
}
|
|
}
|