Skip to content

Rotated Label causes Group widget to extend further than it should#3868

Open
rjwills28 wants to merge 1 commit into
ControlSystemStudio:masterfrom
rjwills28:rotated_label_in_group_bug
Open

Rotated Label causes Group widget to extend further than it should#3868
rjwills28 wants to merge 1 commit into
ControlSystemStudio:masterfrom
rjwills28:rotated_label_in_group_bug

Conversation

@rjwills28

Copy link
Copy Markdown
Contributor

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.
Screenshot from 2026-07-06 14-24-32

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:

    • The feature has automated tests
    • Tests were run
    • If not, explain how you tested your changes
  • Documentation:

    • The feature is documented
    • The documentation is up to date
    • Release notes:
      • Added an entry if the change is breaking or significant
      • Added an entry when adding a new feature

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.
@sonarqubecloud

sonarqubecloud Bot commented Jul 6, 2026

Copy link
Copy Markdown

@kasemir kasemir left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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

Successfully merging this pull request may close these issues.

2 participants