Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

ScrollArea SizeHint() implementation Question #131

Open
Marenu opened this issue May 17, 2018 · 1 comment
Open

ScrollArea SizeHint() implementation Question #131

Marenu opened this issue May 17, 2018 · 1 comment

Comments

@Marenu
Copy link

Marenu commented May 17, 2018

Is it ok that SizeHint() of ScrollArea always return image.Pt(15, 8)?
Imho SizeHint() should depend on the children like the box

@marcusolsson
Copy link
Owner

That was actually the initial implementation. Unlike the box though, the scroll area doesn't actually "contain" the widgets, it's a view that's used to display a part of a theoretically infinite box. If the ScrollArea returns the size hint of the box it contains, the scroll area would be the same size even if the underlying box was completely scrolled out of view. Typically though, you'd make the scroll area expand to whatever space is available.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants