cogentcore / core

A free and open source framework for building powerful, fast, and elegant 2D and 3D apps that run on macOS, Windows, Linux, iOS, Android, and the Web with a single pure Go codebase, allowing you to Code Once, Run Everywhere.
http://cogentcore.org/core
BSD 3-Clause "New" or "Revised" License
1.32k stars 71 forks source link

grow not working properly within sliceview, tableview etc #878

Closed rcoreilly closed 4 months ago

rcoreilly commented 4 months ago

Describe the bug

If you have a field with grow(1,0) set (i.e., new textfield default) then that field gets all the white space stretched out. The allocation is not responsive to the Max property that prevents the actual field from growing all the way. If there wasn't a Max, then the allocation would in fact stretch all the way.

In non-grid layouts, this doesn't happen, so there is something specific to the grid layout that is causing it to ignore the max property.

How to reproduce

get rid of the new s.Grow.Set(0, 0) styling in tableview etc.

to debug, make a simple test case of just a plain grid layout with one grow element.

Example code

No response

Relevant output

No response

Platform

macOS