mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Create Flow.Launcher.Avalonia project as foundation for migrating from WPF to Avalonia UI framework. Key components: - MainWindow with query box and results list (matching WPF layout) - ViewModels: MainViewModel, ResultsViewModel, ResultViewModel - Themes/Base.axaml with converted styles from WPF - FluentAvaloniaUI for Windows 11 styling - References existing Core/Infrastructure/Plugin projects The project builds and runs alongside the existing WPF application. This is Phase 1 of the incremental migration approach.
30 lines
763 B
C#
30 lines
763 B
C#
using CommunityToolkit.Mvvm.ComponentModel;
|
|
using Flow.Launcher.Infrastructure.UserSettings;
|
|
|
|
namespace Flow.Launcher.Avalonia.ViewModel;
|
|
|
|
/// <summary>
|
|
/// ViewModel for a single result item.
|
|
/// </summary>
|
|
public partial class ResultViewModel : ObservableObject
|
|
{
|
|
[ObservableProperty]
|
|
private string _title = string.Empty;
|
|
|
|
[ObservableProperty]
|
|
private string _subTitle = string.Empty;
|
|
|
|
[ObservableProperty]
|
|
private string _iconPath = string.Empty;
|
|
|
|
[ObservableProperty]
|
|
private bool _isSelected;
|
|
|
|
[ObservableProperty]
|
|
private Settings? _settings;
|
|
|
|
// Computed properties for display
|
|
public bool ShowIcon => !string.IsNullOrEmpty(IconPath);
|
|
|
|
public bool ShowSubTitle => !string.IsNullOrEmpty(SubTitle);
|
|
}
|