feat(ui): accent color presets in Settings → General
Adds Moss / Peat / Sea preset swatches to the General settings tab. Selecting a preset mutates the live SolidColorBrush objects in the Application resource dictionary so all StaticResource consumers update instantly; the choice is persisted to ui.config.json and re-applied at startup. Missing or unknown saved value falls back to Moss.
This commit is contained in:
@@ -3,6 +3,7 @@ using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.ApplicationLifetimes;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using ClaudeDo.Ui;
|
||||
using ClaudeDo.Ui.Services;
|
||||
using ClaudeDo.Ui.ViewModels;
|
||||
using ClaudeDo.Ui.Views;
|
||||
@@ -22,6 +23,8 @@ public partial class App : Application
|
||||
public override void Initialize()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
if (_services?.GetService<AppSettings>() is { } settings)
|
||||
AccentPresetService.Apply(AccentPresets.Find(settings.AccentPreset));
|
||||
}
|
||||
|
||||
public override void OnFrameworkInitializationCompleted()
|
||||
|
||||
Reference in New Issue
Block a user