]> git.saurik.com Git - winterboard.git/blobdiff - Library.mm
As reported by thekirbylover, UISounds stack in reverse order.
[winterboard.git] / Library.mm
index 814de11c865a5b671c02fbb82b7288b56b3ece73..676a2572e1eac05c8e267837bd52b6f7054b380d 100644 (file)
@@ -1613,11 +1613,9 @@ MSInstanceMessage1(void, SBIconLabel, drawRect, CGRect, rect) {
 MSInstanceMessage0(CGImageRef, SBIconLabel, buildLabelImage) {
     bool docked((MSHookIvar<unsigned>(self, "_inDock") & 0x2) != 0);
 
 MSInstanceMessage0(CGImageRef, SBIconLabel, buildLabelImage) {
     bool docked((MSHookIvar<unsigned>(self, "_inDock") & 0x2) != 0);
 
-    WBStringDrawingState labelState = {NULL, 0, [NSString stringWithFormat:@""
-        "color: %@;"
-    ,
-        (docked || !SummerBoard_ ? @"white" : @"#b3b3b3")
-    ], docked ? @"DockedIconLabelStyle" : @"UndockedIconLabelStyle"};
+    WBStringDrawingState labelState = {NULL, 0, @""
+        "color: white;"
+    , docked ? @"DockedIconLabelStyle" : @"UndockedIconLabelStyle"};
 
     stringDrawingState_ = &labelState;
 
 
     stringDrawingState_ = &labelState;
 
@@ -1813,7 +1811,7 @@ MSHook(bool, _Z24GetFileNameForThisActionmPcRb, unsigned long a0, char *a1, bool
                 NSString *path([NSString stringWithFormat:@"%@/UISounds/%@", theme, file]);
                 if ([Manager_ fileExistsAtPath:path]) {
                     strcpy(a1, [path UTF8String]);
                 NSString *path([NSString stringWithFormat:@"%@/UISounds/%@", theme, file]);
                 if ([Manager_ fileExistsAtPath:path]) {
                     strcpy(a1, [path UTF8String]);
-                    continue;
+                    break;
                 }
             }
         }
                 }
             }
         }
@@ -1922,7 +1920,7 @@ static void SBInitialize() {
     WBRename(SBDockIconListView, setFrame:, setFrame$);
     MSHookMessage(object_getClass($SBDockIconListView), @selector(shouldShowNewDock), &$SBDockIconListView$shouldShowNewDock, &_SBDockIconListView$shouldShowNewDock);
 
     WBRename(SBDockIconListView, setFrame:, setFrame$);
     MSHookMessage(object_getClass($SBDockIconListView), @selector(shouldShowNewDock), &$SBDockIconListView$shouldShowNewDock, &_SBDockIconListView$shouldShowNewDock);
 
-    if (kCFCoreFoundationVersionNumber < 600)
+    if (kCFCoreFoundationVersionNumber < 600 || SummerBoard_)
         WBRename(SBIconLabel, drawRect:, drawRect$);
     else
         WBRename(SBIconLabel, buildLabelImage, buildLabelImage);
         WBRename(SBIconLabel, drawRect:, drawRect$);
     else
         WBRename(SBIconLabel, buildLabelImage, buildLabelImage);