Skip to content

Commit

Permalink
Fixing try again button getting cut off in FF
Browse files Browse the repository at this point in the history
  • Loading branch information
Saikat Chakrabarti committed Apr 17, 2010
1 parent a792b3d commit 0ee545c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions LoginProviders/SCLoginDialogController.j
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,19 @@ SCLoginFailed = 1;

[_tryAgainButton setTheme:nil];
[_tryAgainButton setTextColor:[CPColor colorWithCalibratedRed:159.0 / 255.0 green:201.0 / 255.0 blue:245.0 / 255.0 alpha:1.0]];
[_tryAgainButton sizeToFit];
[_forgotPasswordLink setFont:[CPFont fontWithName:[[_forgotPasswordLink font] familyName] size:10.0]];
[_tryAgainButton setAlignment:CPLeftTextAlignment];
[_tryAgainButton setStringValue:"Tryagain."];
// I have to set the text color like this - otherwise the underline stays black
if (_tryAgainButton._DOMElement)
{
_tryAgainButton._DOMElement.className = "hover";
_tryAgainButton._DOMElement.style.color = [[CPColor colorWithCalibratedRed:159.0 / 255.0 green:201.0 / 255.0 blue:245.0 / 255.0 alpha:1.0] cssString];
_tryAgainButton._DOMElement.style.textDecoration = "underline";
}

[_tryAgainButton sizeToFit];
// Without this, the button screws up in FF and wraps.
[_tryAgainButton setFrameSize:CGSizeMake([_tryAgainButton frame].size.width + 5.0, [_tryAgainButton frame].size.height)];
[_forgotPasswordLink setFont:[CPFont fontWithName:[[_forgotPasswordLink font] familyName] size:10.0]];
[_forgotPasswordLink setTheme:nil];
[_forgotPasswordLink setTextColor:[CPColor colorWithCalibratedRed:103.0 / 255.0 green:154.0 / 255.0 blue:205.0 / 255.0 alpha:1.0]];
[_forgotPasswordLink sizeToFit];
Expand Down Expand Up @@ -542,7 +545,8 @@ SCLoginFailed = 1;
{
case _userCheckConnection:
if (statusCode === 200)
[self _setDialogModeToLogin];
[self _userCheckFailedWithStatusCode:statusCode];
// [self _setDialogModeToLogin];
else if (statusCode == 404)
[self _setDialogModeToRegister];
else
Expand Down

0 comments on commit 0ee545c

Please sign in to comment.