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

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

Issue 2899133004: Reduce overdraw on bookmark bar (Closed)
Patch Set: Update bookmark bar location and size 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..d9cb97fec88d4d6676415f0259a67f2f1118bcba 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
@@ -509,12 +505,7 @@ void BrowserView::InitStatusBubble() {
}
gfx::Rect BrowserView::GetToolbarBounds() const {
- gfx::Rect toolbar_bounds(toolbar_->bounds());
- if (toolbar_bounds.IsEmpty())
- return toolbar_bounds;
- // The apparent toolbar edges are outside the "real" toolbar edges.
- toolbar_bounds.Inset(-views::NonClientFrameView::kClientEdgeThickness, 0);
- return toolbar_bounds;
+ return toolbar_->bounds();
}
gfx::Rect BrowserView::GetFindBarBoundingBox() const {
@@ -2550,8 +2541,7 @@ int BrowserView::GetRenderViewHeightInsetWithDetachedBookmarkBar() {
}
// Don't use bookmark_bar_view_->height() which won't be the final height if
// the bookmark bar is animating.
- return chrome::kNTPBookmarkBarHeight -
- views::NonClientFrameView::kClientEdgeThickness;
+ return chrome::kNTPBookmarkBarHeight;
}
void BrowserView::ExecuteExtensionCommand(

Powered by Google App Engine
This is Rietveld 408576698