-
Notifications
You must be signed in to change notification settings - Fork 227
Add scrollbars to wizard dialog via ScrolledComposite #3549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add scrollbars to wizard dialog via ScrolledComposite #3549
Conversation
Previously, JFace wizard dialogs could have their content cut off without any scrollbars. This occurred when users resized the dialog or moved it between monitors, where size adjustments caused by rounding could make the dialog smaller than its content. As a result, parts of the UI could become inaccessible without any visual indication. This change wraps the content in a ScrolledComposite, with vertical and horizontal scrollbars so users can still access all content even when the dialog becomes smaller.
laeubi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arunjose696 I don't think this is a valid change. This will suddenly affect all users of WizardDialog (and even break if they depend on internal behavior).
If anything needs to be done (resizing / relayout / ...) then we need to register a zoom change listener and perform the adjustment in a new protected methods so consumers can possibly override that method.
The design of the wizard dialog seems pretty flawed as one can resize (and in particular shrink) it without a scrollbar being provided for the contents. wouldnt the dialogs function as before if the content fits right and The scrollbars only show up when something gets clipped, wouldnt this be a reasonable default for all wizard dialogs?
I can move this to a protected method, but Would it be OK to make the scrolling behavior opt-out? That way anyone who relies on the old behavior can override it, while everyone else gets a scrollbars as default? |
This is for sure but we can't just change it. Also the question is more is the wizard dialog flawed or the implementation that puts content into the dialog. e.g. if I carefully design my controls to have some content that do scrolling (e.g. a table) I won't see the issue but now possibly getting additional scrollbars. What JFace (and SWT in general) mostly miss is the concept of a min / max size of controls.
No see above, only opt-in would be compatible but I doubt we should do it. If I want such behavior I can create s scrolled composite on my own (what has its own limitations and quirks).
Scrollbars of the full content are really a wore UI design on its own and should really never be used without care or other options considered before. |
To fix the issue in implementatation to fix issues with new class dialog I have opened the below PR in JDT so closing this effort |
Previously, JFace wizard dialogs could have their content cut off without any scrollbars. This occurred when users resized the dialog or moved it between monitors, where size adjustments caused by rounding could make the dialog smaller than its content. As a result, parts of the UI could become inaccessible without any visual indication.
This change wraps the content in a ScrolledComposite, with vertical and horizontal scrollbars so users can still access all content even when the dialog becomes smaller.
Steps to reproduce
1)Open a new class dialog in eclipse IDE
2)Resize it to make it smaller to see the scrollbars appear with this change