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

Unified Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm

Issue 2208973003: Add some extra height to bookmark bar if the font wants to be larger (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Call GetPreferredHeight() only once in GetPreferredSize() Created 4 years, 4 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/cocoa/bookmarks/bookmark_bar_controller.mm
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
index 23e7eddd99beb86dfc7327e078326cb561760608..fdeb6b16b5c950d180065a5e179bcc9a973d9464 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
@@ -1096,7 +1096,7 @@ CGFloat BookmarkRightMargin() {
[view setHidden:NO];
// Height takes into account the extra height we have since the toolbar
// only compresses when we're done.
- [view animateToNewHeight:(chrome::kBookmarkBarHeight -
+ [view animateToNewHeight:(chrome::kMinimumBookmarkBarHeight -
bookmarks::kBookmarkBarOverlap)
duration:kBookmarkBarAnimationDuration];
} else if ([self isAnimatingFromState:BookmarkBar::SHOW
@@ -1109,7 +1109,7 @@ CGFloat BookmarkRightMargin() {
toState:BookmarkBar::DETACHED]) {
[view setShowsDivider:YES];
[view setHidden:NO];
- [view animateToNewHeight:chrome::kNTPBookmarkBarHeight
+ [view animateToNewHeight:chrome::kNTPMinimumBookmarkBarHeight
duration:kBookmarkBarAnimationDuration];
} else if ([self isAnimatingFromState:BookmarkBar::DETACHED
toState:BookmarkBar::SHOW]) {
@@ -1117,7 +1117,7 @@ CGFloat BookmarkRightMargin() {
[view setHidden:NO];
// Height takes into account the extra height we have since the toolbar
// only compresses when we're done.
- [view animateToNewHeight:(chrome::kBookmarkBarHeight -
+ [view animateToNewHeight:(chrome::kMinimumBookmarkBarHeight -
bookmarks::kBookmarkBarOverlap)
duration:kBookmarkBarAnimationDuration];
} else {
@@ -1166,10 +1166,10 @@ CGFloat BookmarkRightMargin() {
reduceHeight =
isRetina && !ui::MaterialDesignController::IsModeMaterial();
- return reduceHeight ? chrome::kBookmarkBarHeight + 1
- : chrome::kBookmarkBarHeight;
+ return reduceHeight ? chrome::kMinimumBookmarkBarHeight + 1
+ : chrome::kMinimumBookmarkBarHeight;
case BookmarkBar::DETACHED:
- return chrome::kNTPBookmarkBarHeight;
+ return chrome::kNTPMinimumBookmarkBarHeight;
case BookmarkBar::HIDDEN:
return 0;
}

Powered by Google App Engine
This is Rietveld 408576698