diff options
author | Ryan Petrich <rpetrich@gmail.com> | 2010-09-23 03:28:17 -0600 |
---|---|---|
committer | Jay Freeman <saurik@Jay-Freemans-MacBook-Pro.local> | 2010-10-04 00:12:20 -0700 |
commit | 31f8d96ae92f9a2288a32392eeeaf8667b01c29e (patch) | |
tree | 2456da2cf6632bd47e9ab2125ae815cc9a7b3a63 /Cydia.mm | |
parent | a07b7e8b750ba1cab7ef2f9e6a586a5d205dcbd7 (diff) |
When cancelButtonIndex is -1, use the first button's background image for the rest of the buttons as well
Diffstat (limited to 'Cydia.mm')
-rw-r--r-- | Cydia.mm | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -342,6 +342,18 @@ static _finline NSString *CydiaURL(NSString *path) { } return self; } +- (void)_updateFrameForDisplay { + [super _updateFrameForDisplay]; + if ([self cancelButtonIndex] == -1) { + NSArray *buttons = [self buttons]; + if ([buttons count]) { + UIImage *background = [[buttons objectAtIndex:0] backgroundForState:0]; + for (UIThreePartButton *button in buttons) + [button setBackground:background forState:0]; + } + } +} + - (void) alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { button_ = buttonIndex + 1; } |