From ce11c01a7117d9e1ceb001d1d817e01d25eef6c3 Mon Sep 17 00:00:00 2001 From: Chris Waldon Date: Mon, 19 Sep 2022 16:33:22 -0400 Subject: [PATCH] component: drop erroneous extra table height This commit drops extra height that was added to account for table headers from the component.TableStyle layout. This additional height was no longer needed after the outlay.Grid learned how to compute proper dimensions with locked rows. Signed-off-by: Chris Waldon --- component/grid.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/component/grid.go b/component/grid.go index 3a52a9a..5ce8f96 100644 --- a/component/grid.go +++ b/component/grid.go @@ -87,7 +87,6 @@ func (g GridStyle) Layout(gtx layout.Context, rows, cols int, dimensioner outlay // Calculate column widths in pixels. Width is sum of widths. totalWidth := g.State.Horizontal.Length totalHeight := g.State.Vertical.Length - rowHeight := dimensioner(layout.Vertical, 0, gtx.Constraints.Max.Y) // Make the scroll bar stick to the grid. if gtx.Constraints.Max.X > dim.Size.X { @@ -146,7 +145,6 @@ func (g GridStyle) Layout(gtx layout.Context, rows, cols int, dimensioner outlay if g.AnchorStrategy == material.Occupy { dim.Size.Y += hBarWidth } - dim.Size.Y += rowHeight return dim } -- 2.45.2