Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 2899133004: Reduce overdraw on bookmark bar (Closed)
Patch Set: new approach Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/frame/browser_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 2deae98f3f4f27b3af24bad518cd95c7a44ed0a9..196d49408b59ec25be1f587443091b3cd24b865c 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -200,10 +200,6 @@ void PaintDetachedBookmarkBar(gfx::Canvas* canvas,
// Paint background for detached state; if animating, this is fade in/out.
const ui::ThemeProvider* tp = view->GetThemeProvider();
gfx::Rect fill_rect = view->GetLocalBounds();
- // We have to not color the top 1dp, because that should be painted by the
- // toolbar. We will, however, paint the 1px separator at the bottom of the
- // first dp. See crbug.com/610359
- fill_rect.Inset(0, 1, 0, 0);
// In detached mode, the bar is meant to overlap with |contents_container_|.
// The detached background color may be partially transparent, but the layer
@@ -226,6 +222,9 @@ void PaintDetachedBookmarkBar(gfx::Canvas* canvas,
color_utils::SkColorToHSL(separator_color, &hsl);
hsl.l = std::min((hsl.l + 1) / 2, hsl.l * 2);
BrowserView::Paint1pxHorizontalLine(
+ canvas, tp->GetColor(ThemeProperties::COLOR_TOOLBAR_BOTTOM_SEPARATOR),
+ view->GetLocalBounds(), false);
Evan Stade 2017/05/26 15:03:41 Isn't this separator already being drawn by Opaque
+ BrowserView::Paint1pxHorizontalLine(
canvas, color_utils::HSLToSkColor(hsl, SK_AlphaOPAQUE),
view->GetLocalBounds(), true);
}

Powered by Google App Engine
This is Rietveld 408576698