eclipsesource / eclipsesource/papyrus-gefx
[Renderer] Improve layout consistency when using shapes
- Dominant language
- Java
- Stars
- 0
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
This issue has found while working on #16 and will mostly affect cases where the shape is changed dynamically (Which isn't the typical case - in standard UML the shape is related to the type of semantic element, e.g. Package or Comment, and will never change after created).
When using a standard Region, the border will affect the layout (Border width is involved in inner size computation). However, when using Region#setShape, the Border is applied to the visual shape, but is no longer taken into account for layouts. The result is especially visible when we increase border sizes:

On packages in the left column (Package Shape), the border doesn't affect the position of the label, which is then hidden under the border. In the right column (No Shape), the border affects the position of the label, which remains readable in all circumstances (Making the package bigger when necessary).
This layout inconsistency causes the Package to jump around when switching from the Package Shape to the Rectangle shape (The bigger the border, the worse it becomes)
I'm not sure yet what the best solution would be; but we definitely want consistent results
Package also highlights the "worst case scenario" in that it will need twice as much vertical space for its borders in its Package Path form (Above and Below the tab) compared to its square form, but other simpler shapes are also affected by the layout inconsistency. For example, comments:

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.