~whereswaldon/gio-x

ce11c01a7117d9e1ceb001d1d817e01d25eef6c3 — Chris Waldon 8 months ago 8fad062
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 <christopher.waldon.dev@gmail.com>
1 files changed, 0 insertions(+), 2 deletions(-)

M component/grid.go
M component/grid.go => component/grid.go +0 -2
@@ 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
}