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

Unified Diff: chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc

Issue 2899133004: Reduce overdraw on bookmark bar (Closed)
Patch Set: revert change in browserview 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
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_cocoa.mm ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
index ce37e63e3dbf78cae113307a1998cf5fb894aa80..025e6067381763a35eec235ce8f78e359498de29 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
@@ -605,7 +605,6 @@ BookmarkBarView::BookmarkBarView(Browser* browser, BrowserView* browser_view)
// Don't let the bookmarks show on top of the location bar while animating.
SetPaintToLayer();
layer()->SetMasksToBounds(true);
- layer()->SetFillsBoundsOpaquely(false);
size_animation_.Reset(1);
}
@@ -799,23 +798,19 @@ bool BookmarkBarView::IsDetached() const {
}
int BookmarkBarView::GetToolbarOverlap() const {
- int attached_overlap = kToolbarAttachedBookmarkBarOverlap +
- views::NonClientFrameView::kClientEdgeThickness;
+ int attached_overlap = kToolbarAttachedBookmarkBarOverlap;
+
if (!IsDetached())
return attached_overlap;
- int detached_overlap = views::NonClientFrameView::kClientEdgeThickness;
-
// Do not animate the overlap when the infobar is above us (i.e. when we're
// detached), since drawing over the infobar looks weird.
if (infobar_visible_)
- return detached_overlap;
+ return 0;
// When detached with no infobar, animate the overlap between the attached and
// detached states.
- return detached_overlap + static_cast<int>(
- (attached_overlap - detached_overlap) *
- size_animation_.GetCurrentValue());
+ return static_cast<int>(attached_overlap * size_animation_.GetCurrentValue());
}
int BookmarkBarView::GetPreferredHeight() const {
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_cocoa.mm ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698