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

Unified Diff: chrome/browser/cocoa/extension_installed_bubble_controller.mm

Issue 811002: Merge 41114 - [Mac] More progress towards resizing the Browser Actions contai... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/342/src/
Patch Set: Created 10 years, 9 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/cocoa/extension_installed_bubble_controller.mm
===================================================================
--- chrome/browser/cocoa/extension_installed_bubble_controller.mm (revision 41123)
+++ chrome/browser/cocoa/extension_installed_bubble_controller.mm (working copy)
@@ -174,9 +174,14 @@
NSRect boundsRect = [[[button window] contentView]
convertRect:[button frame]
fromView:[button superview]];
- arrowPoint =
- NSMakePoint(NSMinX(boundsRect) + NSWidth([button frame]) / 2,
- NSMinY(boundsRect));
+ CGFloat xPos = NSMinX(boundsRect) + NSWidth([button frame]) / 2;
+ // If the button is hidden, display the button at the edge of the Browser
+ // Actions container.
+ // TODO(andybons): Make it point to the chevron once it's implemented.
+ if ([button alphaValue] == 0.0)
+ xPos = NSMaxX([[button superview] frame]);
+
+ arrowPoint = NSMakePoint(xPos, NSMinY(boundsRect));
break;
}
case extension_installed_bubble::kPageAction: {
« no previous file with comments | « chrome/browser/cocoa/browser_window_controller.mm ('k') | chrome/browser/cocoa/extensions/browser_actions_container_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698