Closed Bug 1861775 Opened 2 years ago Closed 1 month ago

Support for high-contrast freedesktop preference

Categories

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

Desktop
Linux
enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1922872

People

(Reporter: ferenosdev, Unassigned, Mentored)

Details

(Keywords: access, good-first-bug, Whiteboard: [lang=c++])

Steps to reproduce:

Using Firefox on any Linux-based OS with a Desktop Environment that provides a non-standardised high contrast value

Actual results:

Firefox doesn't enable its high contrast optimisations, despite technically having them in its code

Expected results:

I ended up making a merge request to xdg-portals to support letting applications know if the user prefers usage of High Contrast in applications. It has not been merged yet, and its design isn't fully finalised yet, but this bug report has been created to let Mozilla and other Firefox developers know about this merge request in hopes of allowing earlier preparation for Firefox's high contrast mode to support this preference, as well as serving as a bug to track progress on such support in the event the merge request in question is merged.

Here is the merge request: https://github.com/flatpak/xdg-desktop-portal/pull/1175

I think the status of this enhancement should be new ?

Flags: needinfo?(ferenosdev)
Flags: needinfo?(ferenosdev)
OS: Unspecified → Linux
Hardware: Unspecified → Desktop

Marking as New since it is an enhancement.

Status: UNCONFIRMED → NEW
Ever confirmed: true

Choosing the Disability Access component since this is related to High Contrast mode.

Component: Untriaged → Disability Access
Summary: Prepare support for potential high-contrast freedesktop preference → Support for potential high-contrast freedesktop preference
Summary: Support for potential high-contrast freedesktop preference → Support for high-contrast freedesktop preference

https://github.com/flatpak/xdg-desktop-portal/pull/1175 is now merged. Therefore, there is now officially a contrast standard, so... ig bump...?

This is not quite in the right component :)

The code to implement this would be around nsLookAndFeel::InitializeGlobalSettings (the color-scheme pref code can be an example).

Then we'd have to make this code do something like:

aResult = mPrefersContrastSetting.valueOr(mSystemTheme.mHighContrast);

Or something along those lines.

Mentor: emilio
Severity: -- → S3
Component: Disability Access → Widget: Gtk
Priority: -- → P3
Product: Firefox → Core
Whiteboard: [lang=c++]

Hmm, maybe this is more of a "good second bug"... But happy to mentor in any case :)

I'd be happy to accept the mentorship.
Looking at the code you've linked, it appears to already be doing "something like" aResult = mPrefersContrastSetting.valueOr(mSystemTheme.mHighContrast);:
nsLookAndFeel.cpp
I'm guessing I'd have to focus more on nsLookAndFeel::ComputeColorSchemeSetting?

I think this got done in bug 1922872.

Status: NEW → RESOLVED
Closed: 1 month ago
Duplicate of bug: 1922872
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.