From 74f48419e625d36eadf17e734f6392173683380f Mon Sep 17 00:00:00 2001 From: "j.foucher" Date: Sat, 2 May 2026 09:09:14 +0200 Subject: [PATCH] UI: borderless window with custom chrome, default 1280x720 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Window ------ - Default size 1280x720 (16:9 widescreen — matches the screenshot framing the user requested), MinWidth=980 MinHeight=600. - WindowStyle=None + ResizeMode=CanResize: drop the OS title bar but keep edge resize. - WindowChrome: CaptionHeight=56 makes the top bar Border the drag-handle for moving the window. ResizeBorderThickness=6 gives 6px of grab area on each edge, GlassFrameThickness=0 disables Aero. Custom chrome buttons --------------------- Three new style keys in Theme.xaml: - WindowControlButton: 46x32 transparent button, hovers at #FFFFFF22 (semi-translucent white) — used for minimize and maximize/restore. - WindowCloseButton: same shape, hovers at #E81123 (Win11 red). Three handlers wired up: OnMinimizeClick, OnMaxRestoreClick, OnCloseClick. Caption click-through --------------------- WindowChrome reserves the caption area for window dragging by default — buttons inside it would otherwise feel "dead". Each interactive control in the top bar (Vérifier les MAJ / Dossier / License pill / Activer / Paramètres / min / max / close) gets shell:WindowChrome.IsHitTestVisibleInChrome="True" so clicks reach the button instead of starting a drag. The text/logo region remains draggable. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/PSLauncher.App/Resources/Theme.xaml | 44 +++++++++++++++++++++ src/PSLauncher.App/Views/MainWindow.xaml | 37 +++++++++++++++-- src/PSLauncher.App/Views/MainWindow.xaml.cs | 17 +++++++- 3 files changed, 94 insertions(+), 4 deletions(-) diff --git a/src/PSLauncher.App/Resources/Theme.xaml b/src/PSLauncher.App/Resources/Theme.xaml index 13addaa..c6b45c8 100644 --- a/src/PSLauncher.App/Resources/Theme.xaml +++ b/src/PSLauncher.App/Resources/Theme.xaml @@ -135,6 +135,50 @@ + + + + +