From 0eac0867c0bb4b222d2e3357e20b5b18e031b2ee 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 816733ca..fcfbbcd8 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)