]> git.saurik.com Git - winterboard.git/commitdiff
Fix icon label rendering on iPad (and without SummerBoard).
authorJay Freeman (saurik) <saurik@saurik.com>
Sun, 2 May 2010 23:14:11 +0000 (23:14 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Sun, 2 May 2010 23:14:11 +0000 (23:14 +0000)
Library.mm

index a377ae07a64b65142c9ad1870074f9411cd59068..697f07d1873845474e568647e11689eb1d96fe56 100644 (file)
@@ -1192,14 +1192,21 @@ MSHook(void, SBIconLabel$drawRect$, SBIconLabel *self, SEL sel, CGRect rect) {
 
     NSString *label(MSHookIvar<NSString *>(self, "_label"));
 
+    UIDevice *device([UIDevice currentDevice]);
+    bool isWild([device respondsToSelector:@selector(isWildcat)] && [device isWildcat]);
+
     NSString *style = [NSString stringWithFormat:@""
         "font-family: Helvetica; "
         "font-weight: bold; "
-        "font-size: 11px; "
-        "color: %@; "
-    "", docked ? @"white" : @"#b3b3b3"];
-
-    if (docked)
+        "color: %@; %@"
+    "", (docked || !SummerBoard_ ? @"white" : @"#b3b3b3"), (isWild
+        ? @"font-size: 12px; "
+        : @"font-size: 11px; "
+    )];
+
+    if (isWild)
+        style = [style stringByAppendingString:@"text-shadow: rgba(0, 0, 0, 0.5) 0px 1px 0px; "];
+    else if (docked)
         style = [style stringByAppendingString:@"text-shadow: rgba(0, 0, 0, 0.5) 0px -1px 0px; "];
 
     bool ellipsis(false);