Rotated Label causes Group widget to extend further than it should#3868
Rotated Label causes Group widget to extend further than it should#3868rjwills28 wants to merge 1 commit into
Conversation
A translation is applied to the JFX Label to get a rotated label but the width property of the label remains unchanged and so the group pane thinks this child is wider than it should be and paints the group out to this width causing screen sizing problems.
|
There was a problem hiding this comment.
This appears to make sense. There's a caveat that displays tend to contain MANY labels. Pretty much every text entry, text update, ... has a label next to it. Changing from a low-level Label to a Pane might significantly raise the JFX scene graph complexity.
--> We should watch for performance changes and potentially revert this.
If this needs to be reverted, it might require an approach similar to the code related to was_ever_transformed. Right now it only touches the Transforms if we actually need a rotation. Similarly, it could only add the Pane wrapper when there are Transforms.
But I'd leave that to later and first see how this simpler overall Pane addition works out.



This is the same issue as seen with a vertical progress bar in PR: #3833.
Essentially when the JFX label widget gets rotated, the width and height properties do not get switched and so the group containing the label gets drawn out further than it should be.

Another impact of this is that it can cause widgets next to the group to become un-clickable due to the group being painted wider than it should be and covering neighboring widgets without users noticing. I am attaching an example BOB screen to reproduce this issue:
label_group.bob.txt
The fix for this is the same as that for the progress bar, e.g. wrap the JFX label widget in a JFX pane
Checklist
Testing:
Documentation: