fix: hide scrollbar in dropdown popup on Linux GTK#275
Conversation
The ScrolledComposite in DropdownPopup always shows a scrollbar on Linux GTK even when content fits, causing hover tooltips to be cropped. Setting alwaysShowScrollBars(false) ensures the scrollbar only appears when truly needed. Fixes microsoft#113
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR updates the SWT dropdown popup’s scrolled container configuration to improve scrollbar visibility/behavior.
Changes:
- Disable always-on scrollbars for the dropdown’s
ScrolledComposite.
| scrolledComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); | ||
| scrolledComposite.setExpandHorizontal(true); | ||
| scrolledComposite.setExpandVertical(true); | ||
| scrolledComposite.setAlwaysShowScrollBars(false); |
|
Hi! Just circling back — this small fix addresses the always-visible scrollbar issue in DropdownPopup on Linux GTK. PR is MERGEABLE. Would love to get your thoughts! 🙏 Warmly, RoomWithOutRoof |
|
Hi @Jah-yee, Thank you for your contribution. I do not have a Linux machine at hand, would you mind sharing some screenshot/videos with this patch? |
|
Hi @Jah-yee, I'll try debugging the code. |
|
I've created another PR, see #285 |
|
Seems #285 is more promising, I'll close this patch first. |
Fixes #113
Problem
On Linux GTK, the ScrolledComposite in DropdownPopup always renders a scrollbar
even when all content fits within the visible area. This causes detailed model
information displayed on hover tooltips to be cropped, as the scrollbar overlay
interferes with the rendering of hover content.
Fix
Added after creating the
ScrolledComposite in the constructor. This matches the pattern already used in
(line 258) and (line 119) in the same codebase.
Testing