Open Bug 1147847 Opened 5 years ago Updated 3 days ago

[GTK3] Implement overlay scrollbars

Categories

(Core :: Widget: Gtk, enhancement, P5)

x86_64
Linux
enhancement

Tracking

()

People

(Reporter: stransky, Unassigned)

References

(Blocks 2 open bugs)

Details

(Whiteboard: tpi:+)

Attachments

(1 file)

Gtk3 supports overlay scrollbars so we may consider to implement it too in Gtk3 port. A similar code already exists for Windows 8 Metro and MacOS.
I support this idea. It would be exceedingly nice from a UX perspective.
Duplicate of this bug: 1183967
Severity: normal → enhancement
Duplicate of this bug: 1245051
Without overlay scrollbars, the default theme on ubuntu is glitchy and ugly.]

Glitchiness:
   Sometime the overlay scrollbar animates, other times it's stuck in the "onhover" position, but the scrollbar is always takes up the full space.
s/Sometime/Sometimes/
This will also look nicer under the stock gtk3 default theme (Adwaita). Mimicking native application behavior is always a welcome improvement.
Horizontal overlay-scrollbar has different hover behavior.
How about next steps?
Priority: -- → P5
Whiteboard: tpi:+
Duplicate of this bug: 1337361
In https://bugzilla.mozilla.org/show_bug.cgi?id=1337361 I’ve added some screenshots on how it looks like in other applications and how it does in Firefox. In one word, ugly. It’s especially worse on breeze (default KDE Plasma theme), where the onhover scroll bar is very large. Hopefully, being on HiDPI I have a partial workaround for this. But that’s sub-optimal.
Interestingly, this was apparently resolved in Firefox 60.0, 59.0, 58.0 and 57.0 (I haven't checked earlier versions, so I'm not sure exactly when), for both horizontal and vertical scrollbars, but the issue has fully reappeared in 61.0 — overlay scrollbars have disappeared for both horizontal and vertical scrollbars (they're constantly at full width/height irrespective of whether they're hovered over or not). The issue is also present in Nightly 63.0a1 (2018-07-10).

System: Ubuntu 16.04. For Firefox 61.0 I tested with both the version from the system repositories and directly from Mozilla.
I also like to note that there is an inconsistency in design that would be fixed with the use of overlay scrollbars:
The topmost scrollbar of the viewport has a solid, opaque background (gtk theme's window background instead of scrollbar background). That is usually the scrollbar belonging to the <body> element, but might also be the scrollbar of the <html> element, in which case the <body> scrollbar looks different than usual.

This bugzilla is also a good example for the inconsistency because due to the header, not the entire viewport is scrollable. If the gtk theme's scrollbar background is transparent, it will affect the scrollbar on this page, but not on pages where the whole viewport does scroll.

Another reason for overlay scrollbars is that they are reducing the uniqueness of the browser, improving fingerprint resistance because the viewport size is not affected by the overlay scrollbar. Usually it is and the width depends on the used GTK theme.
See Also: → 1504787

Bumping this thread a bit because of the additional attention that is being placed on OS supported dark modes in Firefox.

When playing with browser.in-content.dark-mode, I needed to switch my GTK theme over to Adwaita dark, and the scrollbars in Firefox are really not good looking with this theme and the resulting dark mode in Firefox.

GNOME Web does this very well and would be a good place to copy the look and feel from, and it would be a nice fit and finish item, alongside the rest of the work that is happening on dark modes in Firefox.

See Also: → 1545969
See Also: → 1565783
Duplicate of this bug: 1567246
Blocks: linuxtheme
See Also: → 1558476
See Also: → 1563187
You need to log in before you can comment on or make changes to this bug.