v0.5 fixes: settings crash, ContextMenu icon column, auto-refresh

Settings crash on ⚙ click
-------------------------
The InverseBoolConverter was declared with `xmlns:local` inline on the
resource element. WPF's BAML compiler did parse it, but the resource
lookup at dialog open time was unstable depending on which XAML reader
processed it first. Move the namespace declaration to the
ResourceDictionary root (xmlns:res) — standard pattern, no more crash.

White strip on the left of the ContextMenu
------------------------------------------
WPF's default MenuItem template renders a column for the icon/check
indicator that's painted in SystemColors.MenuBarBrush (light gray on
default themes), creating a visible white strip on a dark menu. Fix by
fully retemplating MenuItem with just a Border + ContentPresenter for the
header, no icon column, no check indicator. Hover state uses #2C2C32 to
match the rest of the dark theme. Separator is also styled to use
Brush.Border.

Auto-refresh on startup
-----------------------
MainViewModel now triggers CheckForUpdatesAsync from its constructor via
a fire-and-forget Task. A 500ms delay lets the UI render before the
HTTP call, and the call is dispatched back to the UI thread for the VM
state mutations. Failures (offline, server down) are logged but don't
prevent the launcher from being usable on installed versions.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-02 08:39:50 +02:00
parent eeff3c007b
commit 4bec49bcaf
2 changed files with 44 additions and 3 deletions

View File

@@ -127,6 +127,20 @@ public sealed partial class MainViewModel : ObservableObject
_license = _licenseService.GetCached();
RebuildList();
// Vérification automatique des MAJ au démarrage (silencieuse et non bloquante)
_ = Task.Run(async () =>
{
try
{
await Task.Delay(500); // laisse l'UI se stabiliser
await Application.Current.Dispatcher.InvokeAsync(async () =>
{
await CheckForUpdatesAsync();
});
}
catch (Exception ex) { _logger.LogWarning(ex, "Auto check at startup failed"); }
});
}
/// <summary>