From dfc1d8680fec1eab8d6ff84654cbfd2aff07d334 Mon Sep 17 00:00:00 2001 From: Oliver <480930+rivo@users.noreply.github.com> Date: Thu, 4 Apr 2024 18:11:34 +0200 Subject: [PATCH] Removed code that forced the last grid item to be aligned bottom right. Fixes #951 --- grid.go | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/grid.go b/grid.go index 8a855bc..c191bfe 100644 --- a/grid.go +++ b/grid.go @@ -492,20 +492,6 @@ ItemLoop: offsetX += width + add } - // Line up the last row/column with the end of the available area. - var border int - if g.borders { - border = 1 - } - last := len(rowPos) - 1 - if rowPos[last]+rowHeight[last]+border-offsetY < height { - offsetY = rowPos[last] - height + rowHeight[last] + border - } - last = len(columnPos) - 1 - if columnPos[last]+columnWidth[last]+border-offsetX < width { - offsetX = columnPos[last] - width + columnWidth[last] + border - } - // The focused item must be within the visible area. if focus != nil { if focus.y+focus.h-offsetY >= height {