removed some dark theme elements

This commit is contained in:
arichorn 2023-07-29 19:55:10 -05:00 committed by GitHub
parent b1fcf429f6
commit 0f9aabf2a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -57,12 +57,6 @@ UIColor *customColor = [UIColor colorWithRed:0.129 green:0.129 blue:0.129 alpha:
}
}
%orig(color);
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTEngagementPanelView")]) {
if (isDarkMode()) {
color = customColor;
}
}
%orig(color);
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTPlaylistPanelProminentThumbnailVideoCell")]) {
if (isDarkMode()) {
color = customColor;
@ -168,21 +162,11 @@ UIColor *customColor = [UIColor colorWithRed:0.129 green:0.129 blue:0.129 alpha:
}
%end
%hook YTAsyncCollectionView
- (void)setBackgroundColor:(UIColor *)color {
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTRelatedVideosCollectionViewController")]) {
color = [UIColor clearColor];
} else if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTFullscreenMetadataHighlightsCollectionViewController")]) {
color = [UIColor clearColor];
} else {
color = customColor;
}
%orig;
}
- (UIColor *)darkBackgroundColor {
return customColor;
}
- (void)setDarkBackgroundColor:(UIColor *)color {
%orig(customColor);
return isDarkMode() ? %orig(customColor) : %orig;
}
- (void)layoutSubviews {
%orig();
@ -276,11 +260,6 @@ UIColor *customColor = [UIColor colorWithRed:0.129 green:0.129 blue:0.129 alpha:
return isDarkMode() ? %orig(customColor) : %orig;
}
%end
%hook YTVideoView
- (void)setBackgroundColor:(UIColor *)color {
return isDarkMode() ? %orig(customColor) : %orig;
}
%end
%hook YTSearchBoxView
- (void)setBackgroundColor:(UIColor *)color {
return isDarkMode() ? %orig(customColor) : %orig;
@ -514,12 +493,6 @@ UIColor* raisedColor = [UIColor blackColor];
}
}
%orig(color);
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTEngagementPanelView")]) {
if (isDarkMode()) {
color = [UIColor blackColor];
}
}
%orig(color);
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTPlaylistPanelProminentThumbnailVideoCell")]) {
if (isDarkMode()) {
color = [UIColor blackColor];
@ -625,21 +598,11 @@ UIColor* raisedColor = [UIColor blackColor];
}
%end
%hook YTAsyncCollectionView
- (void)setBackgroundColor:(UIColor *)color {
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTRelatedVideosCollectionViewController")]) {
color = [UIColor clearColor];
} else if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTFullscreenMetadataHighlightsCollectionViewController")]) {
color = [UIColor clearColor];
} else {
color = [UIColor blackColor];
}
%orig;
}
- (UIColor *)darkBackgroundColor {
return [UIColor blackColor];
}
- (void)setDarkBackgroundColor:(UIColor *)color {
%orig([UIColor blackColor]);
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
}
- (void)layoutSubviews {
%orig();
@ -733,11 +696,6 @@ UIColor* raisedColor = [UIColor blackColor];
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
}
%end
%hook YTVideoView
- (void)setBackgroundColor:(UIColor *)color {
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;
}
%end
%hook YTSearchBoxView
- (void)setBackgroundColor:(UIColor *)color {
return isDarkMode() ? %orig([UIColor blackColor]) : %orig;