From: Jay Freeman (saurik) Date: Sun, 2 May 2010 23:14:11 +0000 (+0000) Subject: Fix icon label rendering on iPad (and without SummerBoard). X-Git-Tag: v0.9.3900~24 X-Git-Url: https://git.saurik.com/winterboard.git/commitdiff_plain/ac1be56e8361544f17ef3b24c60082251b9535b5 Fix icon label rendering on iPad (and without SummerBoard). --- diff --git a/Library.mm b/Library.mm index a377ae0..697f07d 100644 --- a/Library.mm +++ b/Library.mm @@ -1192,14 +1192,21 @@ MSHook(void, SBIconLabel$drawRect$, SBIconLabel *self, SEL sel, CGRect rect) { NSString *label(MSHookIvar(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);