Closed Bug 1747618 Opened 3 years ago Closed 3 years ago

Support windows 11 non-overlay scrollbar style.

Categories

(Core :: Widget: Win32, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
97 Branch
Tracking Status
firefox97 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

Details

Attachments

(8 files, 3 obsolete files)

157.97 KB, image/png
Details
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
Attached image image.png

At least on my Windows 11 version, apps that use non-overlay scrollbars get a thicker thumb, see screenshot of the "native" scrollbars drawn by task manager (they also are drawn like this in nsNativeTheme).

We also still paint Windows 10 scrollbars on windows 11 with dark theme and "native" scrollbars, which we should probably fix.

Right arrow was being painted pointing to the wrong direction.

Having the points being centered and displace them is easier to reason
about, IMO.

Add a pref to force the small scrollbar even in
non-overlay-scrollbars mode (which is the current behavior).

Depends on D134679

Very trivial changes that make overlay scrollbars work on Windows.

Depends on D134680

Right arrow was being painted pointing to the wrong direction.

Having the points being centered and displace them is easier to reason
about, IMO.

Add a pref to force the small scrollbar even in
non-overlay-scrollbars mode (which is the current behavior).

Depends on D134682

Very trivial changes that make overlay scrollbars work on Windows.

Depends on D134683

Much like GTK. This ensures consistent scrollbar styles across Firefox.

Depends on D134684

Attachment #9256833 - Attachment is obsolete: true
Attachment #9256832 - Attachment is obsolete: true
Attachment #9256831 - Attachment is obsolete: true

This is useful so it doesn't look ugly with custom sizes (which might be useful
for accessibility features), but it will also be necessary for scrollbar-width:
thin.

Depends on D134689

This also makes two tweaks:

  • Consistently applies hover / active feedback independent of scrollbar-color.
  • Apply scrollbar-color to scrollbar buttons too.

Depends on D134690

Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0e01214655e0 Center by default scrollbar arrow X points, fix arrow painting, and document magic numbers. r=spohl https://hg.mozilla.org/integration/autoland/rev/6d3bc5473a1e Implement non-overlay scrollbar style for Win11. r=spohl https://hg.mozilla.org/integration/autoland/rev/3f5065553270 Make overlay scrollbars usable on Windows. r=spohl https://hg.mozilla.org/integration/autoland/rev/56a5f901ac95 Always draw scrollbars using the non-native theme on Windows. r=spohl https://hg.mozilla.org/integration/autoland/rev/6c2ec190cd1f Fix non-unified build in various scrollbar drawing code. r=spohl https://hg.mozilla.org/integration/autoland/rev/4e9ae7efa612 Make Win11 scrollbar drawing work better with custom scrollbar sizes. r=spohl https://hg.mozilla.org/integration/autoland/rev/051c8cc7021c Support scrollbar-width: thin in win11 scrollbars. r=spohl
Blocks: 1748150
Regressions: 1755605
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: