From ac1be56e8361544f17ef3b24c60082251b9535b5 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sun, 2 May 2010 23:14:11 +0000 Subject: [PATCH] Fix icon label rendering on iPad (and without SummerBoard). --- Library.mm | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) 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); -- 2.50.0