From d7b2250669716b9a870ed5a14c89b3175d992e70 Mon Sep 17 00:00:00 2001 From: Louis Pontoise Date: Tue, 21 Apr 2020 04:23:06 +0900 Subject: [PATCH] fix: showed rows with 1 too-few windows sometimes (see #256) --- src/ui/main-window/ThumbnailsView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/main-window/ThumbnailsView.swift b/src/ui/main-window/ThumbnailsView.swift index 816733ca0..fcfbbcd8a 100644 --- a/src/ui/main-window/ThumbnailsView.swift +++ b/src/ui/main-window/ThumbnailsView.swift @@ -33,7 +33,7 @@ class ThumbnailsView: NSVisualEffectView { { () -> Void in Windows.updateFocusedWindowIndex(index) }, height, screen) let width = view.frame.size.width - if (currentX + Preferences.interCellPadding + width).rounded(.down) > widthMax { + if (currentX + width).rounded(.down) > widthMax { currentX = CGFloat(0) currentY = (currentY + Preferences.interCellPadding + height).rounded(.down) maxY = max(currentY + height, maxY)