]> git.saurik.com Git - cydia.git/commitdiff
When cancelButtonIndex is -1, use the first button's background image for the rest...
authorRyan Petrich <rpetrich@gmail.com>
Thu, 23 Sep 2010 09:28:17 +0000 (03:28 -0600)
committerJay Freeman <saurik@Jay-Freemans-MacBook-Pro.local>
Mon, 4 Oct 2010 07:12:20 +0000 (00:12 -0700)
Cydia.mm

index 8eb45e514dbbf268be7aec2aae38d9f6f4162f25..bf320d8f31957014b35e10cf4f75836ab602e16c 100644 (file)
--- 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;
 }