New issue
Advanced search Search tips

Issue 763633 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 1
Type: Bug

Blocking:
issue 505013



Sign in to add a comment

With custom titlebar, top edge of window is not transparent

Project Member Reported by pkasting@chromium.org, Sep 9 2017

Issue description

With the custom Win 10 titlebar enabled, the top edge of the window is non-transparent in a way that looks really bad on my system.  Screenshot attached of the top right corner of Chrome next to the top left corner of a presumably-native app (foobar2000).

I think we did this on purpose for power savings, but either we need to not do that in the rare case where the user (like me) has a custom inactive window frame color, or we need to find a way to do this that doesn't eat battery.
 
Untitled.png
2.7 KB View Download

Comment 1 by bsep@chromium.org, Mar 15 2018

Blocking: 505013

Comment 2 by bsep@chromium.org, Mar 22 2018

We can't make the top border transparent without sacrificing power. I made the top border darker when the frame is dark instead (screenshots attached), and it blends in much better.
frame-color-dark.PNG
1.9 KB View Download
frame-color-incognito.PNG
1.6 KB View Download
Can we just exactly match the opaque color we're drawing the rest of the frame?  I don't remember where the code for this lives and what the constraints are.

Comment 4 by bsep@chromium.org, Mar 22 2018

It's not a bad idea. In the case of your color, I do think it looks a bit better. But in incognito case (which will be the vastly more common case) I think it looks a bit worse. Either way, it's pretty subtle.

I attached screenshots of what it looks like, for comparison. You can see the right (transparent) border, so not having a top border looks odd to me.
frame-color-dark-match.PNG
1.6 KB View Download
frame-color-incognito-match.PNG
1.6 KB View Download
Another possibility would be, use the exact current frame color, but then BlendTowardOppositeLuma() just a little bit to give it a hint of border.  For example, 0x1a (10%).  Tweak as desired to get something that looks reasonable.

If you don't think this method is worth doing, I'd probably go with the comment 4 route over the comment 2 route.

Comment 6 by bsep@chromium.org, Mar 22 2018

0x1A is too much, to my eye. The top border stands out a lot. I reduced it to 0x0C and it is very, very close to what is in comment #2, though I think the green version looks a bit odd.
frame-color-dark-blend.PNG
1.8 KB View Download
frame-color-incognito-blend.PNG
1.8 KB View Download
I don't have a strong preference between comment 4 and comment 6.  Both seem like improvements over comment 2 overall, to me.  Comment 4 is a little better for the green case and comment 6 a little better for the grey case.  I might try testing these against a white backdrop instead of a dark one, or with a light frame color instead of these dark ones.

Whatever looks best to you at the end seems shippable to me.

Comment 8 by bsep@chromium.org, Mar 23 2018

Okay I played around with it more. Patch forthcoming.
* I increased the alpha for the version in #6 very slightly. PB said it's kinda like we're highlighting the window, and I guess I like it even if it's not native per se.
* Against a white background it's really hard to tell there's a border at all, so I didn't optimize for that case at all.
* With a light frame the considerations are completely the opposite. The border stands out a lot against a light background and not at all against a dark background, so I'll keep the current method: a hardcoded color. #AAAAAA is what the native border gets against a white background, so I went with that.
frame-color-incognito-blend2.PNG
1.8 KB View Download
frame-color-light.PNG
14.5 KB View Download
Project Member

Comment 9 by bugdroid1@chromium.org, Mar 23 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4a520b324361dd58d564b82b1d502747f46c67dd

commit 4a520b324361dd58d564b82b1d502747f46c67dd
Author: Bret Sepulveda <bsep@chromium.org>
Date: Fri Mar 23 01:46:07 2018

Change inactive window frame top stroke color when the titlebar is dark.

In the rare case where someone has a dark inactive titlebar color on
Windows 10, the color we were using would sometimes stand out badly.
This patch updates that color to blend in better.

This patch also tweaks the color used in case of a light titlebar, so
that our justification for it isn't just copying Edge.

Bug:  763633 
Change-Id: Ie90867ad51c8027db9aec4fbf5f8969bb48ef0a6
Reviewed-on: https://chromium-review.googlesource.com/977224
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545334}
[modify] https://crrev.com/4a520b324361dd58d564b82b1d502747f46c67dd/chrome/browser/ui/views/frame/glass_browser_frame_view.cc

Comment 10 by bsep@chromium.org, Mar 23 2018

Status: Fixed (was: Assigned)
Labels: TE-Verified-M67 TE-Verified-67.0.3381.0
Able to reproduce this issue on build without fix(checked on 67.0.3378.0). Hence verifying the fix on 67.0.3381.0

Enabled Custom-drawn Windows 10 Titlebar flag and made chrome window inactive by selecting other windows. Now not observing unwanted white line above when in dark theme. Attaching screenshot for reference.

As issue is fixed on latest canary 67.0.3381.0 adding TE-Verified labels.

Thanks!
763633.PNG
965 KB View Download
Labels: -Pri-2 Pri-1

Sign in to add a comment