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

Unified Diff: chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm

Issue 2294733004: Revert of [Mac][Material Design] Fix toolbar height on Retina. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm
diff --git a/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm b/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm
index 7e289b053955f090c26b186f9f1382270b13093a..2034bc1e880c6e6bba0f549074ec0001c56d2bf1 100644
--- a/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm
+++ b/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm
@@ -1055,8 +1055,8 @@
- (CGFloat)baseToolbarHeight {
// Height of the toolbar in pixels when the bookmark bar is closed.
- const bool kIsModeMaterial = ui::MaterialDesignController::IsModeMaterial();
- const CGFloat kBaseToolbarHeightNormal = kIsModeMaterial ? 37 : 35;
+ const CGFloat baseToolbarHeightNormal =
+ ui::MaterialDesignController::IsModeMaterial() ? 37 : 35;
// Not all lines are drawn at 2x normal height when running on Retina, which
// causes the toolbar controls to be visually 1pt too high within the toolbar
@@ -1066,17 +1066,8 @@
// an offsetting change in -[BookmarkBarController preferredHeight] to
// maintain the proper spacing between bookmark icons and toolbar items. See
// https://crbug.com/326245 .
- const CGFloat kLineWidth = [[self view] cr_lineWidth];
- const BOOL kIsRetina = (kLineWidth < 1);
- BOOL reduceHeight = YES;
-
- // If Material Design and Retina, no height adjustment is needed.
- if (kIsModeMaterial && kIsRetina) {
- reduceHeight = NO;
- }
-
- return reduceHeight ? kBaseToolbarHeightNormal - 1
- : kBaseToolbarHeightNormal;
+ return [[self view] cr_lineWidth] == 0.5 ? baseToolbarHeightNormal - 1
+ : baseToolbarHeightNormal;
}
- (CGFloat)desiredHeightForCompression:(CGFloat)compressByHeight {
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698