Skip to content

More Rules. #97

Description

@nicopap

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-layoutrelates to the cuicui_layout crate specificallyT-enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions