Vertical progress bar causes Group widget to extend further than it should#3833
Open
rjwills28 wants to merge 2 commits into
Open
Vertical progress bar causes Group widget to extend further than it should#3833rjwills28 wants to merge 2 commits into
rjwills28 wants to merge 2 commits into
Conversation
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.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



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
I have also attached an example BOB file:
progressbar_group.bob.txt
If you open this with
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.

Checklist
Testing:
Documentation: