Closed Bug 1498592 Opened 6 years ago Closed 6 years ago

Port bug 1496322: [Windows 10 1809] 1px top-border is colored even when "Show accent color in titlebar and borders" is disabled

Categories

(Thunderbird :: Theme, task)

All
Windows 10
task
Not set
normal

Tracking

(thunderbird_esr6063+ fixed, thunderbird63 wontfix, thunderbird64 fixed)

RESOLVED FIXED
Thunderbird 64.0
Tracking Status
thunderbird_esr60 63+ fixed
thunderbird63 --- wontfix
thunderbird64 --- fixed

People

(Reporter: Paenglab, Assigned: Paenglab)

Details

Attachments

(1 file, 2 obsolete files)

From bug 1496322 comment 0:

From Windows October 2018 Update (1809 build 17763.1) and on the 1px border around windows isn't colored by default anymore. If titlebar and borders' color is disabled there is a black-grey border around the window instead.

Firefox continues to draw a colored 1px border on top of the window and it looks a bit odd (see attachment).

And a better explanation in comment 2:

Yes sorry for the confusion : in fact there are multiple options. Since Windows 10 1809 in Windows setting "Show accent color in titlebar" has become "Show accent color in titlebar and borders". The issue doesn't seem to be related to the other options "Choose accent color from the background image".

When the "Show accent color in titlebar and borders" is disabled (see screenshot, sorry my system is in French), the new default way to handle borders make them grey-black. Firefox is the only application on my desktop that keeps the top-border colored.
Attached patch 1498592-1809borderColor.patch (obsolete) — Splinter Review
Jörg, if you are still on a older Windows 10 then you should see no difference.

On Windows 10 1809 and disabled accent colour on titlebar and borders the border is always dark.

This is a port of https://hg.mozilla.org/mozilla-central/rev/92f90717c2a7
Assignee: nobody → richard.marti
Status: NEW → ASSIGNED
Attachment #9016661 - Flags: review?(jorgk)
Comment on attachment 9016661 [details] [diff] [review]
1498592-1809borderColor.patch

I'm still on Windows 10 1803, so I can't try it. I'm not very happy that we need to load the 2000-line 60KB telemetry module just to work out the number of the OS (hence the delay).

Since we're talking about a 1px border here, can we not just hard-code
  document.documentElement.setAttribute("always-use-accent-color-for-window-border", "");

Would that look terrible on older versions?
This is the same patch but without the telemetry module. Like this older than 1809 Win 10 versions behave like the newest. The top border has the accentcolor only when accentcolor in titlebars is enabled and the window is active. You can try it in tabs in titlebar mode with and without accentcolor in window titlebars.

The m-c bug has approval-beta and -ESR, do we want to uplift it too?
Attachment #9017789 - Flags: review?(jorgk)
OK, this quite confusing, even after a discussion on IRC.

So in Windows 10 1803 and below, the accent colour can be applied to the titlebar, but it will always be applied to the window borders. In Windows 10 1809 the user can chose whether to apply the accent colour to titlebar *and* borders, so it is no longer always applied to the borders.

So let's assume accent colour is turned on but *not* applied to the titlebar, and in 1809 also *not* to the borders.

On 1803 without the patch all borders are drawn in accent colour, regardless of whether tabs-in-titlebar is used or not, with the patch the top border isn't drawn in accent colour when tabs-in-titlebar is used. That looks a bit funny, since the window will have three borders, left, right and bottom in the accent colour, and the top border in another colour.

On 1809, which mechanism manages colour for those three borders?

How about doing it differently. If accent colour is chosen for titlebar (and borders in 1809), draw all borders in the accent colour. If accent colour is not chosen for titlebar (and borders in 1809), don't draw any borders in accent colour, or at least not when tabs-in-titlebar is on.

That would bring 1809 behaviour back to 1803 only for Thunderbird but avoid that in 1803 you get three borders painted and the top doesn't get painted.
(In reply to Jorg K (GMT+2) from comment #4)
> OK, this quite confusing, even after a discussion on IRC.
> 
> So in Windows 10 1803 and below, the accent colour can be applied to the
> titlebar, but it will always be applied to the window borders. In Windows 10
> 1809 the user can chose whether to apply the accent colour to titlebar *and*
> borders, so it is no longer always applied to the borders.
> 
> So let's assume accent colour is turned on but *not* applied to the
> titlebar, and in 1809 also *not* to the borders.
> 
> On 1803 without the patch all borders are drawn in accent colour, regardless
> of whether tabs-in-titlebar is used or not, with the patch the top border
> isn't drawn in accent colour when tabs-in-titlebar is used. That looks a bit
> funny, since the window will have three borders, left, right and bottom in
> the accent colour, and the top border in another colour.
> 
> On 1809, which mechanism manages colour for those three borders?

On 1803 the borders are only in accentcolor when "Apply to tilebar and window borders" is enabled. When disabled, the borders are never in accentcolor.

> How about doing it differently. If accent colour is chosen for titlebar (and
> borders in 1809), draw all borders in the accent colour. If accent colour is
> not chosen for titlebar (and borders in 1809), don't draw any borders in
> accent colour, or at least not when tabs-in-titlebar is on.

We can only paint the top border, the three other borders are painted by Windows itself. That's the problem.
OK, we need to do this correctly or it will look bad. I don't think we need 60KB of telemetry code just for one function ;-)
Attachment #9016661 - Attachment is obsolete: true
Attachment #9017789 - Attachment is obsolete: true
Attachment #9016661 - Flags: review?(jorgk)
Attachment #9017789 - Flags: review?(jorgk)
Attachment #9018061 - Flags: review+
Comment on attachment 9018061 [details] [diff] [review]
1498592-1809borderColor.patch with forked getWindowsVersionInfo()

This works for me under Win 10 1809. Thanks.
Attachment #9018061 - Flags: feedback+
Keywords: checkin-needed
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/9348dfd44e19
Port bug 1496322 to TB: Update window border colors for Windows 10 1809 update. r=jorgk
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 64.0
Comment on attachment 9018061 [details] [diff] [review]
1498592-1809borderColor.patch with forked getWindowsVersionInfo()

We'll have to check whether patches apply.
Attachment #9018061 - Flags: approval-comm-esr60+
Attachment #9018061 - Flags: approval-comm-beta+
Type: defect → task
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: