]> git.saurik.com Git - winterboard.git/commitdiff
Fixed CalendarIcon text styling when isWildcat.
authorJay Freeman (saurik) <saurik@saurik.com>
Sun, 2 May 2010 23:01:43 +0000 (23:01 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Sun, 2 May 2010 23:01:43 +0000 (23:01 +0000)
Library.mm
control

index b9399a10c7946f99d8ec76adf7062c644aa5fa79..a377ae07a64b65142c9ad1870074f9411cd59068 100644 (file)
@@ -592,21 +592,28 @@ MSHook(void, SBCalendarIconContentsView$drawRect$, SBCalendarIconContentsView *s
 
     CFRelease(formatter);
 
 
     CFRelease(formatter);
 
-    NSString *datestyle(@""
+    UIDevice *device([UIDevice currentDevice]);
+    bool isWild([device respondsToSelector:@selector(isWildcat)] && [device isWildcat]);
+
+    NSString *datestyle([@""
         "font-family: Helvetica; "
         "font-weight: bold; "
         "font-family: Helvetica; "
         "font-weight: bold; "
-        "font-size: 39px; "
         "color: #333333; "
         "alpha: 1.0; "
         "color: #333333; "
         "alpha: 1.0; "
-    "");
+    "" stringByAppendingString:(isWild
+        ? @"font-size: 54px; "
+        : @"font-size: 39px; "
+    )]);
 
 
-    NSString *daystyle(@""
+    NSString *daystyle([@""
         "font-family: Helvetica; "
         "font-weight: bold; "
         "font-family: Helvetica; "
         "font-weight: bold; "
-        "font-size: 9px; "
         "color: white; "
         "text-shadow: rgba(0, 0, 0, 0.2) -1px -1px 2px; "
         "color: white; "
         "text-shadow: rgba(0, 0, 0, 0.2) -1px -1px 2px; "
-    "");
+    "" stringByAppendingString:(isWild
+        ? @"font-size: 11px; "
+        : @"font-size: 9px; "
+    )]);
 
     if (NSString *style = [Info_ objectForKey:@"CalendarIconDateStyle"])
         datestyle = [datestyle stringByAppendingString:style];
 
     if (NSString *style = [Info_ objectForKey:@"CalendarIconDateStyle"])
         datestyle = [datestyle stringByAppendingString:style];
@@ -618,14 +625,16 @@ MSHook(void, SBCalendarIconContentsView$drawRect$, SBCalendarIconContentsView *s
     CGSize datesize = [(NSString *)date sizeWithStyle:datestyle forWidth:(width + leeway)];
     CGSize daysize = [(NSString *)day sizeWithStyle:daystyle forWidth:(width + leeway)];
 
     CGSize datesize = [(NSString *)date sizeWithStyle:datestyle forWidth:(width + leeway)];
     CGSize daysize = [(NSString *)day sizeWithStyle:daystyle forWidth:(width + leeway)];
 
-    unsigned base($GSFontGetUseLegacyFontMetrics() ? 71 : 70);
+    unsigned base(isWild ? 89 : 70);
+    if ($GSFontGetUseLegacyFontMetrics())
+        base = base + 1;
 
     [(NSString *)date drawAtPoint:CGPointMake(
         (width + 1 - datesize.width) / 2, (base - datesize.height) / 2
     ) withStyle:datestyle];
 
     [(NSString *)day drawAtPoint:CGPointMake(
 
     [(NSString *)date drawAtPoint:CGPointMake(
         (width + 1 - datesize.width) / 2, (base - datesize.height) / 2
     ) withStyle:datestyle];
 
     [(NSString *)day drawAtPoint:CGPointMake(
-        (width + 1 - daysize.width) / 2, (16 - daysize.height) / 2
+        (width + 1 - daysize.width) / 2, ((isWild ? 18 : 16) - daysize.height) / 2
     ) withStyle:daystyle];
 
     CFRelease(date);
     ) withStyle:daystyle];
 
     CFRelease(date);
diff --git a/control b/control
index 3d904d01153f58da05a36b019426e11f0f68476c..15e183dd5fc7edff8d5aa3ccda11a7bfd0195255 100644 (file)
--- a/control
+++ b/control
@@ -3,7 +3,7 @@ Priority: optional
 Section: System
 Maintainer: Jay Freeman (saurik) <saurik@saurik.com>
 Architecture: iphoneos-arm
 Section: System
 Maintainer: Jay Freeman (saurik) <saurik@saurik.com>
 Architecture: iphoneos-arm
-Version: 0.9.3157-1
+Version: 0.9.3173-1
 Description: more powerful, open-source SummerBoard
 Name: WinterBoard
 Depends: mobilesubstrate (>= 0.9.2958-1), killall, preferenceloader, libhide (>= 2.0.4), findutils, net.howett.pincrush (>= 0.0.1-23) | pincrush
 Description: more powerful, open-source SummerBoard
 Name: WinterBoard
 Depends: mobilesubstrate (>= 0.9.2958-1), killall, preferenceloader, libhide (>= 2.0.4), findutils, net.howett.pincrush (>= 0.0.1-23) | pincrush