Skip to content

Vertical progress bar causes Group widget to extend further than it should#3833

Open
rjwills28 wants to merge 2 commits into
ControlSystemStudio:masterfrom
rjwills28:progress_bar_in_group_bug
Open

Vertical progress bar causes Group widget to extend further than it should#3833
rjwills28 wants to merge 2 commits into
ControlSystemStudio:masterfrom
rjwills28:progress_bar_in_group_bug

Conversation

@rjwills28

Copy link
Copy Markdown
Contributor

We discovered a fairly obscure bug when placing a vertical progress bar in a Group widget positioned on the far right edge of a screen. We were opening the window from the command line specifying the height and width so that it opening at the exact size of the screen, however we continued to get scroll bars on the window. We also found that if you right clicked to the right of the group, i.e. outside of the group, you would still get the option to view 'Group' information indicating that the Group had been drawn beyond its defined size.

I found that the cause of this was the vertical progress bar, which by default is horizontal and so a translation is applied to the node. However the width of the Progress bar node before the translation (i.e. the length of the bar) seems to remain the same width after the translation. So when it is placed in a Group widget it thinks that the width of the progress bar is much larger than it is and draws the Group out to the length of the progress bar.

E.g. Maybe easier to see in this example - note the right click menu option and the scroll bars

Screenshot from 2026-06-15 16-00-01

I have also attached an example BOB file:
progressbar_group.bob.txt

If you open this with

phoebus.sh  -resource "file:/path/to/bob/progressbar_group.bob?target=window@210x370+50+50"

you will see that the right click menu extends to the right beyond the group and that you continued to get scroll bars even when the window is large enough to encompass the visible screen.

Something similar has been seen before as a potential bug in the JFX Progress bar, see https://bugs.openjdk.org/browse/JDK-8295341.

I have found a workaround for this issue which involves wrapping the progress bar in a JFX Pane() allowing us to rotate the progress bar as before but then set the correct width/height of the pane so that the Group widget doesn't think that this child element is bigger than it is. This fix gives the desired effect in that we can open the window to fit the screen without scroll bars appearing, e.g.
Screenshot from 2026-06-15 16-03-00

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 JFX progress bar to get a vertical bar
but the width property of the bar remains unchanged and so the group
pane think this child is wider than it should be and paints the group
out to this width causing screen sizing problems.
@sonarqubecloud

Copy link
Copy Markdown

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.

1 participant