summaryrefslogtreecommitdiff
path: root/Cydia.mm
diff options
context:
space:
mode:
authorRyan Petrich <rpetrich@gmail.com>2010-09-23 03:28:17 -0600
committerJay Freeman <saurik@Jay-Freemans-MacBook-Pro.local>2010-10-04 00:12:20 -0700
commit31f8d96ae92f9a2288a32392eeeaf8667b01c29e (patch)
tree2456da2cf6632bd47e9ab2125ae815cc9a7b3a63 /Cydia.mm
parenta07b7e8b750ba1cab7ef2f9e6a586a5d205dcbd7 (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.mm12
1 files changed, 12 insertions, 0 deletions
diff --git a/Cydia.mm b/Cydia.mm
index 8eb45e5..bf320d8 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;
}