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

LAYOUT_LANDSCAPE() rotates the Lay_* directions too #376

Open
kirchsth opened this issue Nov 16, 2024 · 4 comments
Open

LAYOUT_LANDSCAPE() rotates the Lay_* directions too #376

kirchsth opened this issue Nov 16, 2024 · 4 comments
Milestone

Comments

@kirchsth
Copy link
Member

kirchsth commented Nov 16, 2024

The "new" LAYOUT_LANDSCAPE() function offers a significant advantage: it maintains the orientation of Rel_* relationships. For example, Rel_Up(a, bUp, ...) correctly positions bUp above a.

In contrast, the "old" LAYOUT_LEFT_RIGHT() function rotates Rel_Up(a, bUp, ...), resulting in bUp being positioned to the left of a.

However, the Lay_* functions were not updated accordingly and still apply rotation. As a result, Lay_Up(a, bUp) positions bUp to the left of a.

To address this, new LAY_* functions need to be introduced to allow layouts without rotation.

The fix (new LAY_* functions) could be following:

LAY_U(a, bUp)
LAY_R(a, cRight)
LAY_D(a, dDown)
LAY_L(a, eLeft)

@kirchsth kirchsth added this to the v2.12.0 milestone Nov 16, 2024
@kirchsth
Copy link
Member Author

@Potherca: I need a new name that I'm compatible with older layouts and therefore I defined "LAY_..." in uppercase like all other layout related calls (which are defined in Layout.md).
But I really don't like "LAY_..." in uppercase, because it looks so different in contrast to "Rel_...".
Do you have an idea of another/better name?

@Potherca
Copy link
Member

Hmmm. 🤔

LayoutWithRotation is a bit long, but descriptive. The question then becomes is there soming as descriptive but shorter?

Would there be a large downside to using Layout_...? 1

Alternatively, another word could be used, like "Positioning" which would give us (as an abbreviated form) Pos_....

Footnotes

  1. Other than possible user confusion, but the is a potential problem regales of chosen name.

@kirchsth
Copy link
Member Author

I like Pos_... .

I don't understand your potential problem, what do you mean? Do you see a technical issue?

Another alternative could be that we add an additional optional argument to the LAYOUT_LANDSCAPE() like LAYOUT_LANDSCAPE(?withFix=false) and then we could activate the fix with LAYOUT_LANDSCAPE(true) and LAYOUT_LANDSCAPE() use the old layout rules. What do you think?

@Potherca
Copy link
Member

No technical issue. The "potential problem" is that users might not understand the distinction between Rel, Lay and Pos, but I don't think there is much that can be done about that.

Usually I am not a big fan of boolean parameters, but in this case it might be a cleaner solution than introducing another set of functions.

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

No branches or pull requests

2 participants