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

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

Issue 2471583002: [Mac] Change the omnibox decoration padding (Closed)
Patch Set: Fixed tests Created 4 years, 1 month 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/security_state_bubble_decoration.h ('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/location_bar/security_state_bubble_decoration.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/security_state_bubble_decoration.mm b/chrome/browser/ui/cocoa/location_bar/security_state_bubble_decoration.mm
index 2596751860805fb55d359f3b1b34c25672a690e5..c6fe3eee02af325d14ef9a23e28905314d196696 100644
--- a/chrome/browser/ui/cocoa/location_bar/security_state_bubble_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/security_state_bubble_decoration.mm
@@ -29,8 +29,8 @@
namespace {
-// This is used to increase the right margin of this decoration.
-const CGFloat kRightSideMargin = 1.0;
+// This is used to increase the left padding of this decoration.
+const CGFloat kLeftSidePadding = 5.0;
// Padding between the icon and label.
CGFloat kIconLabelPadding = 4.0;
@@ -160,6 +160,7 @@ void SecurityStateBubbleDecoration::DrawInFrame(NSRect frame,
NSRect image_rect = decoration_frame;
image_rect.origin.y +=
std::floor((NSHeight(decoration_frame) - image_size.height) / 2.0);
+ image_rect.origin.x += kLeftSidePadding;
image_rect.size = image_size;
[image_ drawInRect:image_rect
fromRect:NSZeroRect // Entire image
@@ -242,24 +243,6 @@ void SecurityStateBubbleDecoration::DrawInFrame(NSRect frame,
}
}
-void SecurityStateBubbleDecoration::DrawWithBackgroundInFrame(
- NSRect background_frame,
- NSRect frame,
- NSView* control_view) {
- NSRect rect = NSInsetRect(background_frame, 0, 3);
- rect.size.width -= kRightSideMargin;
-
- CGFloat line_width = [control_view cr_lineWidth];
- bool in_dark_mode = [[control_view window] inIncognitoModeWithSystemTheme];
- // Only adjust the path rect by 1/2 the line width if it's going to be
- // stroked (so that the stroke lines fall along pixel lines).
- if (!in_dark_mode) {
- rect = NSInsetRect(rect, line_width / 2., line_width / 2.);
- }
-
- DrawInFrame(frame, control_view);
-}
-
// Pass mouse operations through to location icon.
bool SecurityStateBubbleDecoration::IsDraggable() {
return location_icon_->IsDraggable();
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/security_state_bubble_decoration.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698