From 87ac94e3782bcdb0d5f47c24461255aa454d701b Mon Sep 17 00:00:00 2001 From: GA Date: Sun, 25 Oct 2026 15:34:51 +0100 Subject: [PATCH] feat: always keep the preview window on top The preview window is now always topmost and the "keep on top" toggle button is hidden, so a preview is never buried behind the window it was opened from. The "Topmost" setting is no longer read or written, so its entry is removed from OPTIONS.md. Co-Authored-By: Claude Haiku 5.5 --- OPTIONS.md | 7 ------- QuickLook/ViewerWindow.xaml.cs | 13 ++++--------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/OPTIONS.md b/OPTIONS.md index a5fd6b0cb..f09c27ec8 100644 --- a/OPTIONS.md +++ b/OPTIONS.md @@ -60,13 +60,6 @@ Example: - Example: - `#FFC0CB` -### `` -- Default: `False` -- Type: `Boolean` -- Description: Keep the preview window on top of other windows. -- Example: - - `True` - ### `` - Default: `False` - Type: `Boolean` diff --git a/QuickLook/ViewerWindow.xaml.cs b/QuickLook/ViewerWindow.xaml.cs index 7eb190af7..e98145e86 100644 --- a/QuickLook/ViewerWindow.xaml.cs +++ b/QuickLook/ViewerWindow.xaml.cs @@ -67,8 +67,10 @@ internal ViewerWindow() windowFrameContainer.PreviewMouseMove += ShowWindowCaptionContainer; - Topmost = SettingHelper.Get("Topmost", false); - buttonTop.Tag = Topmost ? "Top" : "Auto"; + // The preview window is always on top; the toggle button is hidden. + Topmost = true; + buttonTop.Tag = "Top"; + buttonTop.Visibility = Visibility.Collapsed; ShowInTaskbar = SettingHelper.Get("ShowInTaskbar", false); @@ -87,13 +89,6 @@ internal ViewerWindow() }, DispatcherPriority.ContextIdle); }; - buttonTop.Click += (_, _) => - { - Topmost = !Topmost; - SettingHelper.Set("Topmost", Topmost); - buttonTop.Tag = Topmost ? "Top" : "Auto"; - }; - buttonPin.Click += (_, _) => { if (SettingHelper.Get("CloseOnLostFocus", false))