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

Unified Diff: chrome/browser/ui/cocoa/browser_window_controller_private.mm

Issue 8671002: Cocoa: Custom drawing for GAIA avatar pictures (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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
Index: chrome/browser/ui/cocoa/browser_window_controller_private.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_controller_private.mm b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
index f48876d72c609ac5489139a6eb2a8a6253f3ca97..e9784aabd04574ad817d4fe71b6ff997f8d1988e 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller_private.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
@@ -12,6 +12,7 @@
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/prefs/scoped_user_pref_update.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/profiles/profile_info_util.h"
#include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h"
#include "chrome/browser/ui/browser_list.h"
#import "chrome/browser/ui/cocoa/browser/avatar_button_controller.h"
@@ -357,8 +358,8 @@ willPositionSheet:(NSWindow*)sheet
// Now lay out incognito badge together with the tab strip.
if ([self shouldShowAvatar]) {
NSView* avatarButton = [avatarButtonController_ view];
- [avatarButton setFrameSize:NSMakeSize(tabStripHeight,
- tabStripHeight - 5.0)];
+ [avatarButton setFrameSize:NSMakeSize(profiles::kAvatarIconWidth,
sail 2011/11/26 06:52:00 On my machine (10.6) tabStripHeight is 37 pixels.
Robert Sesek 2011/11/28 23:03:23 Does this look OK now? Or should we turn on image
sail 2011/11/28 23:11:33 This looks really good now. With the new control s
+ MIN(profiles::kAvatarIconHeight, tabStripHeight))];
Robert Sesek 2011/11/28 19:17:53 std::min
sail 2011/11/28 19:40:31 Done.
// Actually place the badge *above* |maxY|, by +2 to miss the divider. On
// Lion or later, shift the badge left to move it away from the fullscreen

Powered by Google App Engine
This is Rietveld 408576698