Closed Bug 1705460 Opened 5 years ago Closed 5 years ago

My daily got into an state in which it had the "default theme" on linux, but still had non-native scrollbars (other code thought that I had a non-default theme enabled)

Categories

(Thunderbird :: Theme, defect)

defect

Tracking

(thunderbird_esr78 unaffected)

RESOLVED FIXED
89 Branch
Tracking Status
thunderbird_esr78 --- unaffected

People

(Reporter: emilio, Assigned: emilio)

Details

Attachments

(3 files)

See the title...

A couple weeks ago I noticed my scrollbars in Daily were square in one of my machines (but not in the other). Both use the system theme. Today I'm using that machine again and decide to dig a bit...

It's because of these rules, but of course those should only apply when a non-default theme is applied.

Now the issue is that switching themes and back fixed it, so I can't reproduce anymore :(. But filing just in case this rings a bell and you can see what might go on.

This is using the "Arc Dark" GTK theme, which is dark. So maybe some code got confused and tried to apply the default dark theme or something like we do on windows?

Oh! They're back to square. That's odd, but hopefully I can help diagnose!

Uh, why the spam icon is black? 😢

The "all mail" icon is also black, in both my installations (the "good" and the "bad" one, when there's no remaining mail). A few other icons are also black. Do you know where are those defined? When I inspect that part of the UI I only get to the <treechildren>

Yeah, those are defined here: https://searchfox.org/comm-central/rev/fcb2f819cde716b9ed6596168f5a0498819b88a0/mail/themes/shared/mail/folderPane.css

They can't be inspected directly because of the "beauty" of XUL tree :P

Yeah, so these don't match on the default linux theme, because it's not a lightweight theme.

So for that you want something like:

@media (prefers-color-scheme: dark) {
  :root:not(:-moz-lwtheme) {
      --default: #dcdcdc;
      --primary: #45b1ff;
  }
}

Or such. Though after https://phabricator.services.mozilla.com/D111486 you should be able to just write:

@media (-moz-toolbar-prefers-color-scheme: dark) {
  :root {
    ...
  }
}

And remove the first rules.

Attached patch scrollbars.patch — — Splinter Review

We apparently set the lwt-tree* attributes even on the default theme:

https://searchfox.org/comm-central/rev/3a01c489963cb3bc423bb3b78e9cbecbec6b99fe/mail/base/content/toolbarIconColor.js#131-164

It's a bit sketchy to set lwt-* attributes when there's no theme, maybe the lwt-* prefix should be removed. But this is the right fix anyways.

Assignee: nobody → emilio
Attachment #9216614 - Flags: review?(alessandro)
Attached patch unread.patch — — Splinter Review

This fixes the color of the unread icons, see the commit description for details.

Attachment #9216615 - Flags: review?(alessandro)

Comment on attachment 9216614 [details] [diff] [review]
scrollbars.patch

Thank you so much for taking care of these.
I'll redirect these reviews to Richard, which is the Theme module owner and can properly test these changes on al platforms.

Attachment #9216614 - Flags: review?(alessandro) → review?(richard.marti)
Attachment #9216615 - Flags: review?(alessandro) → review?(richard.marti)

Comment on attachment 9216614 [details] [diff] [review]
scrollbars.patch

Yes, this makes sense.

Attachment #9216614 - Flags: review?(richard.marti) → review+

Comment on attachment 9216615 [details] [diff] [review]
unread.patch

Why does this works? We have other places in this file where we only set the fill and they are working. Should we change them to color: x; and set the fill: currentColor; on the main rule?

Many thanks for fixing both issues!

Attachment #9216615 - Flags: review?(richard.marti) → review+

Setting fill works usually. The problem is that that variable is "inherit", and inheriting fill is not the same as inheriting color.

I'll set c-c so it will be landed.

Status: NEW → ASSIGNED
Target Milestone: --- → 89 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/25eb8425f3ab
Don't set scrollbar-colors when using the system theme. r=Paenglab
https://hg.mozilla.org/comm-central/rev/b7937efa808c
Fix unread folder icon color. r=Paenglab

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: