From 57c95a6e357abeed5d5b25edd30c174fc07404a0 Mon Sep 17 00:00:00 2001 From: lwouis Date: Thu, 12 Mar 2026 11:12:20 +0100 Subject: [PATCH] fix: thumbnails might be shown too small --- src/logic/Window.swift | 2 +- src/logic/events/WindowCaptureEvents.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/logic/Window.swift b/src/logic/Window.swift index 3be8e560..f6868f8a 100644 --- a/src/logic/Window.swift +++ b/src/logic/Window.swift @@ -112,7 +112,7 @@ class Window { if let position, let size, let view = (TilesView.recycledViews.first { $0.window_?.cgWindowId == cgWindowId }) { if !view.thumbnail.isHidden { - let thumbnailSize = TileView.thumbnailSize(screenshot.size(), false) + let thumbnailSize = TileView.thumbnailSize(size, false) let newSize = thumbnailSize.width != view.thumbnail.frame.width || thumbnailSize.height != view.thumbnail.frame.height view.thumbnail.updateContents(screenshot, thumbnailSize) // if the thumbnail size has changed, we need to refresh the open UI diff --git a/src/logic/events/WindowCaptureEvents.swift b/src/logic/events/WindowCaptureEvents.swift index f3e2daca..deab3260 100644 --- a/src/logic/events/WindowCaptureEvents.swift +++ b/src/logic/events/WindowCaptureEvents.swift @@ -271,7 +271,7 @@ extension SCStreamConfiguration { // capture screenshots as small as needed for the thumbnails let maxSize = TilesPanel.maxPossibleThumbnailSize guard maxSize.width > 0, maxSize.height > 0 else { return } - let scale = min(maxSize.width / originalSize.width, maxSize.height / originalSize.height) + let scale = min(1.0, maxSize.width / originalSize.width, maxSize.height / originalSize.height) width = Int((originalSize.width * scale).rounded()) height = Int((originalSize.height * scale).rounded()) }