Skip to content

Commit dceeac9

Browse files
committed
Make sure that width is correct with minimum items in a suggestion.
1 parent 79b0b6c commit dceeac9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/contents/ui/WindowSuggestions.qml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@ Window {
121121
log('CellWidth before: ' + cellWidth);
122122
if (suggestionsInsideTile) {
123123
if (cellWidth < 320) {
124-
colCount = Math.floor(convertedOverlay[activeIndex].width / 320);
124+
colCount = Math.min(count, Math.floor(convertedOverlay[activeIndex].width / 320));
125125
} else {
126-
colCount = Math.floor(convertedOverlay[activeIndex].width / cellWidth);
126+
colCount = Math.min(count, Math.floor(convertedOverlay[activeIndex].width / cellWidth));
127127
}
128128
cellWidth = (convertedOverlay[activeIndex].width - gridSpacing * (colCount + 1)) / Math.max(colCount, 2);
129129
}

0 commit comments

Comments
 (0)