Closed samuelchristlie closed 4 months ago
I'm not sure if this is an expected behavior
const (
// Auto is used to widget.Size to indicate height or width to occupy available spaces.
Auto [float32](https://pkg.go.dev/builtin#float32) = -1
)
On one hand, it does fill the available space, but I was thinking the sizes would get calculated after other widgets.
@samuelchristlie sorry for late raply This works as expected. Think about this like that: giu calls widgets one by one, so at the moment of calling your dummy (spacer) it does not know that you're going to add your submit button.
In order to calculate your dummy's height, you need to use giu.GetAvailableRegion
and decrease it by height of your button
Ahh, that makes sense. Thank you :+1:
What happend?
I'm following the recommendation from https://github.com/AllenDang/giu/issues/177 to create a spacer, but used
g.Auto
instead since it should automatically fill the space. What I got is this:What I think is happening is that it doesn't take the height of the tab bar into account.
Code example
To Reproduce
g.Auto
exceeds the heightVersion
master
OS
Linux Mint 21.3 x86_64