X-Git-Url: https://git.saurik.com/winterboard.git/blobdiff_plain/cc11d828788cfea2fb2f63c52695af3252b5cc1d..237d7f0420cf89f21bccfc1f563b0c22f0de5d3f:/Library.mm?ds=inline diff --git a/Library.mm b/Library.mm index c0b7284..676a257 100644 --- a/Library.mm +++ b/Library.mm @@ -200,7 +200,7 @@ static BOOL (*_GSFontGetUseLegacyFontMetrics)(); static bool Debug_ = false; static bool UIDebug_ = false; static bool Engineer_ = false; -static bool SummerBoard_ = true; +static bool SummerBoard_ = false; static bool SpringBoard_; static UIImage *(*_UIApplicationImageWithName)(NSString *name); @@ -1613,11 +1613,9 @@ MSInstanceMessage1(void, SBIconLabel, drawRect, CGRect, rect) { MSInstanceMessage0(CGImageRef, SBIconLabel, buildLabelImage) { bool docked((MSHookIvar(self, "_inDock") & 0x2) != 0); - WBStringDrawingState labelState = {NULL, 0, [NSString stringWithFormat:@"" - "color: %@;" - , - (docked || !SummerBoard_ ? @"white" : @"#b3b3b3") - ], docked ? @"DockedIconLabelStyle" : @"UndockedIconLabelStyle"}; + WBStringDrawingState labelState = {NULL, 0, @"" + "color: white;" + , docked ? @"DockedIconLabelStyle" : @"UndockedIconLabelStyle"}; stringDrawingState_ = &labelState; @@ -1813,7 +1811,7 @@ MSHook(bool, _Z24GetFileNameForThisActionmPcRb, unsigned long a0, char *a1, bool NSString *path([NSString stringWithFormat:@"%@/UISounds/%@", theme, file]); if ([Manager_ fileExistsAtPath:path]) { strcpy(a1, [path UTF8String]); - continue; + break; } } } @@ -1922,7 +1920,7 @@ static void SBInitialize() { WBRename(SBDockIconListView, setFrame:, setFrame$); MSHookMessage(object_getClass($SBDockIconListView), @selector(shouldShowNewDock), &$SBDockIconListView$shouldShowNewDock, &_SBDockIconListView$shouldShowNewDock); - if (kCFCoreFoundationVersionNumber < 600) + if (kCFCoreFoundationVersionNumber < 600 || SummerBoard_) WBRename(SBIconLabel, drawRect:, drawRect$); else WBRename(SBIconLabel, buildLabelImage, buildLabelImage); @@ -1972,6 +1970,9 @@ MSInitialize { if (NSDictionary *settings = [NSDictionary dictionaryWithContentsOfFile:[NSString stringWithFormat:@"/User/Library/Preferences/com.saurik.WinterBoard.plist"]]) { if (NSNumber *value = [settings objectForKey:@"SummerBoard"]) SummerBoard_ = [value boolValue]; + else + SummerBoard_ = true; + if (NSNumber *value = [settings objectForKey:@"Debug"]) Debug_ = [value boolValue]; if (NSNumber *value = [settings objectForKey:@"RecordUI"])