Closed Bug 1690778 Opened 3 years ago Closed 3 years ago

Select list items are using Ubuntu theme colors

Categories

(Core :: Widget: Gtk, defect)

Unspecified
Linux
defect

Tracking

()

RESOLVED FIXED
87 Branch
Fission Milestone M8
Tracking Status
firefox87 --- fixed

People

(Reporter: pascalc, Assigned: emilio)

References

Details

(Whiteboard: fission-nnt)

Attachments

(5 files)

Attached image bad colors in select

Mozilla/5.0 (X11; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0 ID:20210204093834

The color and background color of selected list items are still Ubuntu Yaru colors with the non native theme activated. See the attached image for demo.
Ubuntu 20.10.

Fission Milestone: --- → M8
OS: Unspecified → Linux
Whiteboard: fission-nnt

This was most likely using :shorlander's form control page that used to be accessible at https://stephenhorlander.com/photon/UI-Controls/form-widgets.html. Those form controls were user-styled (with padding: 0px for example) and therefore switched back to native theme colors.

If you can reproduce on other non-user styled controls, please reopen.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INVALID

Reopening, you can easily see the bug with this:
data:text/html,<select multiple><option selected>Foo

Status: RESOLVED → REOPENED
Resolution: INVALID → ---

(In reply to Pascal Chevrel:pascalc from comment #2)

Reopening, you can easily see the bug with this:
data:text/html,<select multiple><option selected>Foo

Oh, I apologize, I skipped right over the fact that you mentioned the selected list items were in the native color. I think we might be getting lucky on Windows and macOS because I don't recall changing these colors there. Emilio, could you have a look on Linux and let me know what you think? Maybe this merits a cross-platform implementation to make this color explicit in the non-native theme.

Flags: needinfo?(emilio)

This makes form controls match the rest of the GTK theme like selection
colors, etc.

An alternative to this would be to just use non-native colors on GTK for
all content, but that seems somewhat unfortunate and we do the right
thing for scrollbars so...

I've tried on a variety of themes and this looks nice so far.

Assignee: nobody → emilio

So this is a sorta pre-existing problem. The issue is that we take selection / highlight colors from the gtk theme but we don't do the same for form controls.

There are three approaches:

  • Don't do anything, this is no different than selecting text.
  • Make controls use theme-derived colors.
  • Use non-native colors for selection and such as well.

I think (2) is best, and was relatively easy to implement. We can reconsider if it causes issues but I think given we already use those colors for a bunch of other things (like selection, the url bar, ....) using the accent color derived from the GTK theme should be fine.

Flags: needinfo?(emilio)
Attached image Controls with adwaita
Blocks: 1691781
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5913a4a254df
Derive accent color from theme highlight color in GTK. r=mstange
Pushed by emilio@crisal.io:
https://hg.mozilla.org/integration/autoland/rev/af1ad1fab16e
Add a missing include on android on a CLOSED TREE
Status: REOPENED → RESOLVED
Closed: 3 years ago3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: