Bug 571256 - [win32] Incorrect client area on hiding scrollbar
Summary: [win32] Incorrect client area on hiding scrollbar
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.18   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-17 09:23 EST by Dirk Fauth CLA
Modified: 2021-02-17 11:57 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Fauth CLA 2021-02-17 09:23:04 EST
In NatTable we have a feature to specify the table column widths by percentage. It is also possible to have a mixed definition of fixed and percentage sized columns.

In a mixed setup, you can extend the client area which makes the vertical scrollbar visible. Reducing a column width hides the scrollbar. But I noticed that the client area is incorrect in that case, as it takes the vertical scrollbar width into account, although it was never visible.

The issue seems to be related to ScrollBar#setVisible(). Even setting the scrollbar to visible=false, it will make the scrollbars first visible. This triggers a resize event with the incorrect client area dimensions. But there is no resize event fired afterwards when the scrollbars are hidden again.

As a result we are not able to fill the whole vertical space once the horizontal scrollbar is hidden, as the resize event is fired while the scrollbar is temporarily visible, and there is no resize event once it is hidden as it was intended by the call.

The comment in the code says it was a workaround for some strange behavior on Windows 7. Not sure if this workaround is still needed to make both scrollbars visible before hiding them.
Comment 1 Andrey Loskutov CLA 2021-02-17 10:47:17 EST
Patch?
Comment 2 Dirk Fauth CLA 2021-02-17 11:57:49 EST
(In reply to Andrey Loskutov from comment #1)
> Patch?

Are you asking me for a patch? 

Sorry, but the SWT code is nothing I understand. I don't understand the native stuff nor do I understand the implications of possible changes on other operating systems. 

So no, I can't provide a patch that would be in any way satisfying.