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

Unified Diff: chrome/browser/ui/cocoa/infobars/infobar_gradient_view.mm

Issue 1885903003: [Mac] Increase infobar height under Material Design. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/infobars/infobar_gradient_view.mm
diff --git a/chrome/browser/ui/cocoa/infobars/infobar_gradient_view.mm b/chrome/browser/ui/cocoa/infobars/infobar_gradient_view.mm
index e6ffb682d350bce4d151d6638d1d7bd4b109c6e2..f00e1d46082c548b4d6379a102486160a1e06e74 100644
--- a/chrome/browser/ui/cocoa/infobars/infobar_gradient_view.mm
+++ b/chrome/browser/ui/cocoa/infobars/infobar_gradient_view.mm
@@ -14,6 +14,7 @@
#include "components/infobars/core/infobar.h"
#include "skia/ext/skia_utils_mac.h"
#import "ui/base/cocoa/nsview_additions.h"
+#include "ui/base/material_design/material_design_controller.h"
#include "ui/base/theme_provider.h"
@implementation InfoBarGradientView
@@ -59,8 +60,11 @@
- (void)drawRect:(NSRect)rect {
NSRect bounds = [self bounds];
- bounds.size.height = InfoBarContainerDelegate::kDefaultBarTargetHeight;
-
+ if (ui::MaterialDesignController::IsModeMaterial()) {
+ bounds.size.height = InfoBarContainerDelegate::kDefaultBarTargetHeightMd;
+ } else {
+ bounds.size.height = InfoBarContainerDelegate::kDefaultBarTargetHeight;
+ }
CGFloat tipXOffset = arrowX_ - arrowHalfWidth_;
// Around the bounds of the infobar, continue drawing the path into which the

Powered by Google App Engine
This is Rietveld 408576698