]> git.saurik.com Git - winterboard.git/commitdiff
Fix support for TimeStyle on iOS 4.x and 5.x.
authorJay Freeman (saurik) <saurik@saurik.com>
Sun, 18 Mar 2012 08:04:48 +0000 (08:04 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Sun, 18 Mar 2012 08:04:48 +0000 (08:04 +0000)
Library.mm

index 9a04fb556c6817f5dfd8bcda475ad7d536610972..7c9c5946031e14b8f0cf9fde57a8bdc02301ee6b 100644 (file)
@@ -121,6 +121,7 @@ MSClassHook(UIImage)
 MSMetaClassHook(UIImage)
 MSClassHook(UINavigationBar)
 MSClassHook(UIToolbar)
+MSClassHook(UIStatusBarTimeItemView)
 
 MSClassHook(CKBalloonView)
 MSClassHook(CKMessageCell)
@@ -854,6 +855,19 @@ MSInstanceMessageHook1(UIImage *, SBCalendarApplicationIcon, generateIconImage,
     return image;
 }
 
+MSInstanceMessageHook1(UIImage *, UIStatusBarTimeItemView, contentsImageForStyle, int, style) {
+    WBStringDrawingState timeState = {NULL, 0, @""
+        "color: white;"
+    , @"TimeStyle"};
+
+    stringDrawingState_ = &timeState;
+
+    UIImage *image(MSOldCall(style));
+
+    stringDrawingState_ = NULL;
+    return image;
+}
+
 MSHook(void, SBCalendarIconContentsView$drawRect$, SBCalendarIconContentsView *self, SEL sel, CGRect rect) {
     NSBundle *bundle([NSBundle mainBundle]);