From: Ryan Petrich Date: Thu, 23 Sep 2010 09:28:17 +0000 (-0600) Subject: When cancelButtonIndex is -1, use the first button's background image for the rest... X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/8b6bb0fdb59195a6dd3417c0f6b1b4e4d9457ae8 When cancelButtonIndex is -1, use the first button's background image for the rest of the buttons as well --- diff --git a/Cydia.mm b/Cydia.mm index 8eb45e51..bf320d8f 100644 --- a/Cydia.mm +++ b/Cydia.mm @@ -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; }