From 6128f7d220b5f10db90d7f0f9d0a90311f0dc5c3 Mon Sep 17 00:00:00 2001 From: "j.foucher" Date: Fri, 1 May 2026 09:50:51 +0200 Subject: [PATCH] UI: featured hero card, vivid status colors, themed Markdown render MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Featured version ---------------- The highest installed version (or highest remote if none installed) now gets a large hero card at the top of the window: 32px Proserve title, oversized colored status pill, and a much bigger primary action button (LANCER / INSTALLER 56px padding). All other versions move below into a "AUTRES VERSIONS" section with a horizontal divider, displayed as the existing compact rows. MainViewModel exposes FeaturedVersion + OtherVersions instead of one flat Versions collection. Vivid status colors ------------------- Card backgrounds were too close (dark gray vs slightly bluer dark gray). New scheme: - Installed: card stays dark gray, but a 4px green strip on the left and a vivid green "● Installée" pill make it unmistakable. - Available remote-only: distinct dark blue card + vivid blue strip + blue "○ Disponible" pill. - Busy: amber strip + amber pill, amber progress bar. Brushes added to Theme.xaml: Brush.Status.Installed (#16A34A), Brush.Status.Available (#3B82F6), Brush.Status.Busy (#F59E0B), each with a matching very-dark-tint *Bg variant for card backgrounds. Markdown theming ---------------- Release notes dialogs were unreadable (white background, near-white text). Markdig.Wpf produces a FlowDocument with default white bg / black fg regardless of the host control. Added MarkdownTheming.BuildThemedDocument which renders the Markdown then walks all blocks/inlines to apply the launcher's dark palette (Brush.Bg.Card transparent, Brush.Text.Primary foreground, Brush.Accent links). Both UpdateAvailableDialog and ReleaseNotesViewerDialog use this helper. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/PSLauncher.App/Resources/Theme.xaml | 8 + .../ViewModels/MainViewModel.cs | 37 +- src/PSLauncher.App/Views/MainWindow.xaml | 491 ++++++++++++------ src/PSLauncher.App/Views/MarkdownTheming.cs | 111 ++++ .../Views/ReleaseNotesViewerDialog.xaml.cs | 16 +- .../Views/UpdateAvailableDialog.xaml.cs | 18 +- 6 files changed, 479 insertions(+), 202 deletions(-) create mode 100644 src/PSLauncher.App/Views/MarkdownTheming.cs diff --git a/src/PSLauncher.App/Resources/Theme.xaml b/src/PSLauncher.App/Resources/Theme.xaml index b1ef735..d6e0ce3 100644 --- a/src/PSLauncher.App/Resources/Theme.xaml +++ b/src/PSLauncher.App/Resources/Theme.xaml @@ -16,6 +16,14 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + @@ -28,172 +162,202 @@ Foreground="{StaticResource Brush.Text.Primary}" VerticalAlignment="Center" /> + + + + + + + + + + + + + - - - - - - - - + + + Background="#2A2A30" BorderThickness="0" />