Stop scrollbars from flickering on/off when resizing windows#3887
Open
rjwills28 wants to merge 1 commit into
Open
Stop scrollbars from flickering on/off when resizing windows#3887rjwills28 wants to merge 1 commit into
rjwills28 wants to merge 1 commit into
Conversation
Also only trigger scroll bars in the direction that is too small and not both. This implementation changes the CSS styling of some widgets so these are also fixed.
|
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 noticed that when you resize a window with the mouse you can see scroll bars flicker on and off. See attached screencast showing this:
scrollbar_flicker.webm
You will also see that even when the window is made smaller than the screen in one direction, you still get scroll bars appear in both x and y even though they are only needed in one.
The issue is caused by code that attempts to resize the widget pane to fill the parent scroll pane:
phoebus/app/display/representation-javafx/src/main/java/org/csstudio/display/builder/representation/javafx/JFXRepresentation.java
Line 651 in 11eb814
This is a workaround to another issue of setting the background of a ScrollPane, see comments in code here:
phoebus/app/display/representation-javafx/src/main/java/org/csstudio/display/builder/representation/javafx/JFXRepresentation.java
Line 939 in 11eb814
setMinSize()method to fill the ScrollPane. This must be causing some race condition where it momentarily thinks the pane is too small for the content and so puts on scroll bars before realising it is not and then removing them.The fix for the scroll bar issue described above is to remove this listener and the resizing of the widget pane. However this then leaves us with this problem of setting the background. I have been able to fix this by:
I have tested this with all widgets and noticed some different behavior for the Tabs widget where the tab label text was white, as was the border. I fixed this by explicitly setting them in the code.
I think my implementation also goes some way to fixing #3677, or at least when you zoom out the background still gets painted all the way out so you wouldn't see the grey background in this example.
Manual tests to run:
Checklist
Testing:
Documentation: