Fix GridView extra space

This commit is contained in:
cutefishd 2021-04-15 10:34:32 +08:00
parent 11bf737d1d
commit 845c0b40f0

View file

@ -533,7 +533,7 @@ GridView {
var extraSpacing = 0 var extraSpacing = 0
if (availableColumns > 0) { if (availableColumns > 0) {
var allColumnSize = availableColumns * cellSize var allColumnSize = availableColumns * cellSize
var extraSpace = Math.max(containerSize - allColumnSize, FishUI.Units.largeSpacing) var extraSpace = Math.max(containerSize - allColumnSize, 0)
extraSpacing = extraSpace / availableColumns extraSpacing = extraSpace / availableColumns
} }
return Math.floor(extraSpacing) return Math.floor(extraSpacing)