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

Unified Diff: chrome/browser/ui/cocoa/location_bar/bubble_decoration.mm

Issue 2375033002: cocoa browser: remove non-MD location bar support (Closed)
Patch Set: Created 4 years, 3 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/location_bar/bubble_decoration.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/bubble_decoration.mm b/chrome/browser/ui/cocoa/location_bar/bubble_decoration.mm
index dbc6c5b50c3c3088b47edb3d1abc3fc91202f017..88333e7fca7ccbcfaaaa35f80f4500e5f480026f 100644
--- a/chrome/browser/ui/cocoa/location_bar/bubble_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/bubble_decoration.mm
@@ -21,7 +21,7 @@
// Padding between the icon/label and bubble edges.
CGFloat BubblePadding() {
- return ui::MaterialDesignController::IsModeMaterial() ? 8.0 : 3.0;
+ return 8.0;
}
Avi (use Gerrit) 2016/09/28 16:01:58 return to being a const CGFloat like lines 20, 28,
Elly Fong-Jones 2016/09/28 19:02:27 Done.
// Additional padding between the divider and the label.
@@ -45,7 +45,7 @@ CGFloat BubblePadding() {
}
CGFloat BubbleDecoration::DividerPadding() const {
- return ui::MaterialDesignController::IsModeMaterial() ? kDividerPadding : 0.0;
+ return kDividerPadding;
}
CGFloat BubbleDecoration::GetWidthForImageAndLabel(NSImage* image,
@@ -115,22 +115,20 @@ CGFloat BubblePadding() {
}
// Draw the divider and set the text color.
- if (ui::MaterialDesignController::IsModeMaterial()) {
- NSBezierPath* line = [NSBezierPath bezierPath];
- [line setLineWidth:1];
- [line moveToPoint:NSMakePoint(NSMaxX(decoration_frame) - DividerPadding(),
- NSMinY(decoration_frame))];
- [line lineToPoint:NSMakePoint(NSMaxX(decoration_frame) - DividerPadding(),
- NSMaxY(decoration_frame))];
-
- bool in_dark_mode = [[control_view window] inIncognitoModeWithSystemTheme];
- [GetDividerColor(in_dark_mode) set];
- [line stroke];
-
- NSColor* text_color =
- in_dark_mode ? GetDarkModeTextColor() : GetBackgroundBorderColor();
- SetTextColor(text_color);
- }
+ NSBezierPath* line = [NSBezierPath bezierPath];
+ [line setLineWidth:1];
+ [line moveToPoint:NSMakePoint(NSMaxX(decoration_frame) - DividerPadding(),
+ NSMinY(decoration_frame))];
+ [line lineToPoint:NSMakePoint(NSMaxX(decoration_frame) - DividerPadding(),
+ NSMaxY(decoration_frame))];
+
+ bool in_dark_mode = [[control_view window] inIncognitoModeWithSystemTheme];
+ [GetDividerColor(in_dark_mode) set];
+ [line stroke];
+
+ NSColor* text_color =
+ in_dark_mode ? GetDarkModeTextColor() : GetBackgroundBorderColor();
+ SetTextColor(text_color);
if (label_) {
NSRect text_rect = frame;
@@ -154,11 +152,6 @@ CGFloat BubblePadding() {
NSView* control_view) {
NSRect rect = NSInsetRect(background_frame, 0, 1);
rect.size.width -= kRightSideMargin;
- if (!ui::MaterialDesignController::IsModeMaterial()) {
- ui::DrawNinePartImage(
- rect, GetBubbleImageIds(), NSCompositeSourceOver, 1.0, true);
- }
-
DrawInFrame(frame, control_view);
}

Powered by Google App Engine
This is Rietveld 408576698