Revert some OLED Dark Theme changes

This commit is contained in:
arichorn 2023-07-29 13:05:01 -05:00 committed by GitHub
parent 5c401620dd
commit b1fcf429f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -331,7 +331,7 @@ UIColor *customColor = [UIColor colorWithRed:0.129 green:0.129 blue:0.129 alpha:
return isDarkMode() ? %orig(customColor) : %orig; return isDarkMode() ? %orig(customColor) : %orig;
} }
- (void)layoutSubviews { - (void)layoutSubviews {
return isDarkMode() : %orig(); %orig();
MSHookIvar<YTTopAlignedView *>(self, "_contentView").backgroundColor = customColor; MSHookIvar<YTTopAlignedView *>(self, "_contentView").backgroundColor = customColor;
} }
%end %end
@ -420,7 +420,7 @@ UIColor *customColor = [UIColor colorWithRed:0.129 green:0.129 blue:0.129 alpha:
%end %end
%hook YTShareMainView %hook YTShareMainView
- (void)layoutSubviews { - (void)layoutSubviews {
return isDarkMode() : %orig(); %orig();
MSHookIvar<YTQTMButton *>(self, "_cancelButton").backgroundColor = customColor; MSHookIvar<YTQTMButton *>(self, "_cancelButton").backgroundColor = customColor;
MSHookIvar<UIControl *>(self, "_safeArea").backgroundColor = customColor; MSHookIvar<UIControl *>(self, "_safeArea").backgroundColor = customColor;
} }
@ -642,7 +642,7 @@ UIColor* raisedColor = [UIColor blackColor];
%orig([UIColor blackColor]); %orig([UIColor blackColor]);
} }
- (void)layoutSubviews { - (void)layoutSubviews {
return isDarkMode() : %orig(); %orig();
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTWatchNextResultsViewController")]) { if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTWatchNextResultsViewController")]) {
self.subviews[0].subviews[0].backgroundColor = [UIColor blackColor]; self.subviews[0].subviews[0].backgroundColor = [UIColor blackColor];
} }
@ -877,7 +877,7 @@ UIColor* raisedColor = [UIColor blackColor];
%end %end
%hook YTShareMainView %hook YTShareMainView
- (void)layoutSubviews { - (void)layoutSubviews {
return isDarkMode() : %orig(); %orig();
MSHookIvar<YTQTMButton *>(self, "_cancelButton").backgroundColor = [UIColor blackColor]; MSHookIvar<YTQTMButton *>(self, "_cancelButton").backgroundColor = [UIColor blackColor];
MSHookIvar<UIControl *>(self, "_safeArea").backgroundColor = [UIColor blackColor]; MSHookIvar<UIControl *>(self, "_safeArea").backgroundColor = [UIColor blackColor];
} }