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

More Rules. #97

Open
5 tasks
nicopap opened this issue Oct 8, 2023 · 0 comments
Open
5 tasks

More Rules. #97

nicopap opened this issue Oct 8, 2023 · 0 comments
Labels
C-layout relates to the cuicui_layout crate specifically T-enhancement New feature or request

Comments

@nicopap
Copy link
Owner

nicopap commented Oct 8, 2023

cuicui_layout is a bureaucracy and thrives on Rules. An utopia of Rules if you will…

I suggest three new rules. Those are missing pieces that lumex already has:

  • Rule::Content(f32): Similar to LeafRule::Content, but generalized to containers.
  • {Rule,LeafRule}::AspectRatio(f32): Get the size of this axis relative to the other, such that the aspect ration is preserved
  • {Rule,LeafRule}::ContentAspectRatio: Get the size relative to the other, such as the aspect ratio is preserved. But the aspect ratio is inherited from the content.
  • This would require dropping the content-size feature that keeps the aspect ratio. Dropping the feature will clarify where the size comes from.
  • Convert ScreenRoot to use Content rule, since now we can use it for container nodes
@nicopap nicopap added T-enhancement New feature or request C-layout relates to the cuicui_layout crate specifically labels Oct 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-layout relates to the cuicui_layout crate specifically T-enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant