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

Unified Diff: chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm

Issue 6802026: Move profile menu button to leave room for full screen button (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_strip_controller.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/tabs/tab_strip_controller.mm
diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
index fd7ad450a8f03932f4b5cf648a967c7295cf1ebe..c568e8c41d1538b5ec576b24fc683563306102cd 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
@@ -1038,6 +1038,20 @@ class NotificationBridge : public NotificationObserver {
NSRect profileMenuButtonFrame = [profileMenuButton_ frame];
NSSize minSize = [profileMenuButton_ minControlSize];
+ // Make room for the full screen button if necessary.
+ if (!hasUpdatedProfileMenuButtonXOffset_) {
+ hasUpdatedProfileMenuButtonXOffset_ = YES;
+ if ([[profileMenuButton_ window]
+ respondsToSelector:@selector(toggleFullScreen:)]) {
+ NSButton* fullscreenButton = [[profileMenuButton_ window]
+ standardWindowButton:NSWindowFullScreenButton];
+ if (fullscreenButton) {
+ profileMenuButtonFrame.origin.x = NSMinX([fullscreenButton frame]) -
+ NSWidth(profileMenuButtonFrame) - kProfileMenuButtonOffset;
+ }
+ }
+ }
+
// TODO(sail): Animate this.
CGFloat availableWidth = NSMaxX(profileMenuButtonFrame) - maxX -
kProfileMenuButtonOffset;
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_strip_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698