Skip to content

Commit

Permalink
[Mac] Set the avatar button auth error before initially drawing the b…
Browse files Browse the repository at this point in the history
…utton.

Otherwise when opening a new window (and initially drawing it), the button
will not take the auth error icon's size in consideration.

BUG=411962

Review URL: https://codereview.chromium.org/555923002

Cr-Commit-Position: refs/heads/master@{#293969}
  • Loading branch information
notwaldorf authored and Commit bot committed Sep 9, 2014
1 parent dfdafae commit fab5d30
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ - (id)initWithBrowser:(Browser*)browser {
profiles::GetSigninErrorController(browser->profile());

[button_ setCell:cell.get()];

if (errorController)
[cell setHasError:errorController->HasError() withTitle:[button_ title]];

[self setView:button_];

[button_ setBezelStyle:NSShadowlessSquareBezelStyle];
Expand All @@ -196,8 +200,6 @@ - (id)initWithBrowser:(Browser*)browser {
[button_ setAction:@selector(buttonClicked:)];

[self updateAvatarButtonAndLayoutParent:NO];
if (errorController)
[cell setHasError:errorController->HasError() withTitle:[button_ title]];

NSNotificationCenter* center = [NSNotificationCenter defaultCenter];
[center addObserver:self
Expand Down

0 comments on commit fab5d30

Please sign in to comment.