Repository navigation
Conversation
when opening a display in a new window from an action. This avoids flickering due to the unnecessary resizing and repositioning of the stage.
|
This branch has not been deployed
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.



When opening a display in a new window from an action button the code would previously create a stage at a default size and show it, before then resizing it to the correct size and position. This could produce a flicker across the display as the screen first gets shown at the default size and position (which is a larger screen somewhere in the middle of the display) and then quickly gets moved and resized to where it should be.
There was a bug in JFX21 that meant this was the way we had to do it. The bug related to the width and height not being applied properly before
stage.show()meaning you needed to show the stage before you could resize. But this has been fixed in JFX25 so we can now both remove the flicker from the new window jumping and tidy up the code.This change establishes what the x,y, height and width should be before creating the stage and constructs a Geometry object from a string (instead of null) to pass into the stage configuration method, which should be a much tidier implementation.
I have also shrunk down the margins for the standalone windows as they do not need to be so big.
Checklist
Testing:
Documentation: