Skip to content

Fix scroll bars with GTK WebKit

Kai Uwe Broulik requested to merge work/kubr/gtk-webkit-scrollbar into master

scrollbar: Split margin between scrollbar and trough

The side padding is turned into a margin on the trough to ensure that GTK WebKit reacts to the full width of the scroll bar.

The vertical padding, however, is kept in the scrollbar to avoid GTK WebKit scrollbar overflowing past the end of the track.

Likewise for horizontal scroll bars.

scrollbar: Don't use negative margin to counteract border size

GTK WebKit's custom painting code doesn't handle negative margins correctly leading to the scrollbar disappearing as it either gets pushed out the side of the window or gets a negative size.


See also https://bugs.webkit.org/show_bug.cgi?id=234874 (contained code snippet can be used to reproduce the issue)

Merge request reports