Skip to content

Commit

Permalink
Stop drawing border between window frame and toolbar in PWAs.
Browse files Browse the repository at this point in the history
The custom tab bar should appear as an extension of the
title bar. Before this CL, this was not not the case on
Linux or Windows without DWM (disable-dwm-composition),
as we draw small borders between the window frame and the
toolbar. This CL removes them when displaying the custom
tab bar.

Before: https://bugs.chromium.org/p/chromium/issues/attachment?aid=372746&signed_aid=ybrF8gUqHfRhz-mI-R7-SQ==&inline=1
After: https://bugs.chromium.org/p/chromium/issues/attachment?aid=372747&signed_aid=-_9BQ_5YxzT6Gg67Aj49ag==&inline=1

Bug: 853593
Change-Id: Ice90aef02c074d344066f8b5dd8e50fe77310a8e
Reviewed-on: https://chromium-review.googlesource.com/c/1385685
Commit-Queue: Jay Harris <[email protected]>
Reviewed-by: Peter Kasting <[email protected]>
Cr-Commit-Position: refs/heads/master@{#618404}
  • Loading branch information
fallaciousreasoning authored and Commit Bot committed Dec 21, 2018
1 parent a4bd5ce commit 9d37d51
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,10 @@ void OpaqueBrowserFrameView::OnPaint(gfx::Canvas* canvas) {
* So we'd need to sample the background color at the right location and
* synthesize a good shadow color. */

PaintClientEdge(canvas);
// Custom tab bar mode draws the toolbar as a unified part of the titlebar, so
// it shouldn't have a client edge.
if (!browser_view()->toolbar()->custom_tab_bar())
PaintClientEdge(canvas);
}

// BrowserNonClientFrameView:
Expand Down

0 comments on commit 9d37d51

Please sign in to comment.