Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VUI: More layout boxes for aligning widgets #526

Open
kpreid opened this issue Sep 20, 2024 · 0 comments
Open

VUI: More layout boxes for aligning widgets #526

kpreid opened this issue Sep 20, 2024 · 0 comments
Labels
area: ui kind: feature Adding user-facing/developer-facing functionality

Comments

@kpreid
Copy link
Owner

kpreid commented Sep 20, 2024

In order to to have good and easy-to-define UI layout, we need more layout functionality than the current basis of “minimum size” boxes only.

In particular, I think that we need something I don't yet have a good name for but I've been calling “base-box”, which is a “preferred” size that is neither minimal nor maximal, which primarily flows from parents to children during layout. For example,

  • The base-box of the HUD layout should be a box that fits fully within the area of the screen, separate from margin/border/overscan space, and in the depth axis, defines the plane in which the HUD widgets should lie.
  • In a vertical stack of buttons, the base-box is chosen to fit the widest button label, and makes all the buttons that wide.

Widgets can stick out past the base-box as necessary to fit their content. LayoutGrants go from having only a maximum bounds they are allowed to draw in, to also having the base-box which they can try to fit themselves into.

@kpreid kpreid added kind: feature Adding user-facing/developer-facing functionality area: ui labels Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ui kind: feature Adding user-facing/developer-facing functionality
Projects
None yet
Development

No branches or pull requests

1 participant