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

Unified Diff: chrome/browser/ui/cocoa/extensions/toolbar_actions_bar_bubble_mac.mm

Issue 2539293002: Fix learn more button positioning (Closed)
Patch Set: Created 4 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/extensions/toolbar_actions_bar_bubble_mac.mm
diff --git a/chrome/browser/ui/cocoa/extensions/toolbar_actions_bar_bubble_mac.mm b/chrome/browser/ui/cocoa/extensions/toolbar_actions_bar_bubble_mac.mm
index dea4c91276a0520d40cd7062e677b13b02d44593..7e2ab57c3f29413a5ffd6ea6f562d64d73886232 100644
--- a/chrome/browser/ui/cocoa/extensions/toolbar_actions_bar_bubble_mac.mm
+++ b/chrome/browser/ui/cocoa/extensions/toolbar_actions_bar_bubble_mac.mm
@@ -318,27 +318,27 @@ CGFloat kMinWidth = 320.0;
dismissButtonSize.height)];
currentMaxWidth -= (dismissButtonSize.width + kButtonPadding);
}
+ int leftAlignXPos = kHorizontalPadding;
+ if (iconView_) {
+ CGFloat extraViewIconHeight =
+ currentHeight + (buttonStripHeight - extraViewIconSize.height) / 2.0;
+
+ [iconView_
+ setFrame:NSMakeRect(leftAlignXPos, extraViewIconHeight,
+ extraViewIconSize.width, extraViewIconSize.height)];
+ leftAlignXPos += extraViewIconSize.width + kButtonPadding;
+ }
if (label_ || link_) {
CGFloat extraViewTextHeight =
currentHeight + (buttonStripHeight - extraViewTextSize.height) / 2.0;
- NSRect frame = NSMakeRect(currentMaxWidth - extraViewTextSize.width,
- extraViewTextHeight, extraViewTextSize.width,
- extraViewTextSize.height);
+ NSRect frame =
+ NSMakeRect(leftAlignXPos, extraViewTextHeight, extraViewTextSize.width,
+ extraViewTextSize.height);
if (link_) {
[link_ setFrame:frame];
} else {
[label_ setFrame:frame];
}
- currentMaxWidth -= extraViewTextSize.width + kButtonPadding;
- }
- if (iconView_) {
- CGFloat extraViewIconHeight =
- currentHeight + (buttonStripHeight - extraViewIconSize.height) / 2.0;
-
- [iconView_
- setFrame:NSMakeRect(kHorizontalPadding, extraViewIconHeight,
- extraViewIconSize.width, extraViewIconSize.height)];
- currentMaxWidth -= extraViewIconSize.width + kButtonPadding;
}
// Buttons have some inherit padding of their own, so we don't need quite as
// much space here.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698