From 8b6bb0fdb59195a6dd3417c0f6b1b4e4d9457ae8 Mon Sep 17 00:00:00 2001 From: Ryan Petrich Date: Thu, 23 Sep 2010 03:28:17 -0600 Subject: [PATCH] When cancelButtonIndex is -1, use the first button's background image for the rest of the buttons as well --- Cydia.mm | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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; } -- 2.45.2