Update Themes.xm
This commit is contained in:
parent
3e62990038
commit
b5a0a88a0d
1 changed files with 18 additions and 15 deletions
|
|
@ -387,7 +387,8 @@ UIColor *customColor = [UIColor colorWithRed:0.129 green:0.129 blue:0.129 alpha:
|
|||
%end
|
||||
%hook _ASDisplayView
|
||||
- (void)layoutSubviews {
|
||||
%orig();
|
||||
%orig;
|
||||
if (isDarkMode()) {
|
||||
UIResponder *responder = [self nextResponder];
|
||||
while (responder != nil) {
|
||||
if ([responder isKindOfClass:NSClassFromString(@"YTActionSheetDialogViewController")]) {
|
||||
|
|
@ -403,7 +404,8 @@ UIColor *customColor = [UIColor colorWithRed:0.129 green:0.129 blue:0.129 alpha:
|
|||
self.backgroundColor = customColor;
|
||||
}
|
||||
responder = [responder nextResponder];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
- (void)didMoveToWindow {
|
||||
%orig;
|
||||
|
|
@ -414,6 +416,7 @@ UIColor *customColor = [UIColor colorWithRed:0.129 green:0.129 blue:0.129 alpha:
|
|||
if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment_cell"]) { self.backgroundColor = customColor; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"id.ui.cancel.button"]) { self.superview.backgroundColor = [UIColor clearColor]; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.comment_composer"]) { self.backgroundColor = customColor; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.filter_chip_bar"]) { self.backgroundColor = customColor; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.video_list_entry"]) { self.backgroundColor = customColor; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"id.comment.guidelines_text"]) { self.superview.backgroundColor = customColor; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"id.comment.channel_guidelines_bottom_sheet_container"]) { self.backgroundColor = customColor; }
|
||||
|
|
@ -505,9 +508,6 @@ UIColor* raisedColor = [UIColor blackColor];
|
|||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YCHLiveChatTickerViewController")]) {
|
||||
color = [UIColor blackColor];
|
||||
}
|
||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTInnerTubeCollectionViewController")]) {
|
||||
color = [UIColor blackColor];
|
||||
}
|
||||
if ([self.nextResponder isKindOfClass:NSClassFromString(@"YTEditSheetControllerHeader")]) {
|
||||
color = [UIColor blackColor];
|
||||
}
|
||||
|
|
@ -805,7 +805,8 @@ UIColor* raisedColor = [UIColor blackColor];
|
|||
%end
|
||||
%hook _ASDisplayView
|
||||
- (void)layoutSubviews {
|
||||
%orig();
|
||||
%orig;
|
||||
if (isDarkMode()) {
|
||||
UIResponder *responder = [self nextResponder];
|
||||
while (responder != nil) {
|
||||
if ([responder isKindOfClass:NSClassFromString(@"YTActionSheetDialogViewController")]) {
|
||||
|
|
@ -821,21 +822,23 @@ UIColor* raisedColor = [UIColor blackColor];
|
|||
self.backgroundColor = [UIColor blackColor];
|
||||
}
|
||||
responder = [responder nextResponder];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
- (void)didMoveToWindow {
|
||||
%orig;
|
||||
if (isDarkMode()) {
|
||||
if ([self.nextResponder isKindOfClass:%c(ASScrollView)]) { self.backgroundColor = [UIColor clearColor]; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"eml.cvr"]) { self.backgroundColor = customColor; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"rich_header"]) { self.backgroundColor = customColor; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment_cell"]) { self.backgroundColor = customColor; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"eml.cvr"]) { self.backgroundColor = [UIColor blackColor]; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"rich_header"]) { self.backgroundColor = [UIColor blackColor]; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment_cell"]) { self.backgroundColor = [UIColor blackColor]; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"id.ui.cancel.button"]) { self.superview.backgroundColor = [UIColor clearColor]; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.comment_composer"]) { self.backgroundColor = customColor; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.video_list_entry"]) { self.backgroundColor = customColor; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"id.comment.guidelines_text"]) { self.superview.backgroundColor = customColor; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"id.comment.channel_guidelines_bottom_sheet_container"]) { self.backgroundColor = customColor; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"id.comment.channel_guidelines_entry_banner_container"]) { self.backgroundColor = customColor; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.comment_composer"]) { self.backgroundColor = [UIColor blackColor]; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.filter_chip_bar"]) { self.backgroundColor = [UIColor blackColor]; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.video_list_entry"]) { self.backgroundColor = [UIColor blackColor]; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"id.comment.guidelines_text"]) { self.superview.backgroundColor = [UIColor blackColor]; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"id.comment.channel_guidelines_bottom_sheet_container"]) { self.backgroundColor = [UIColor blackColor]; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"id.comment.channel_guidelines_entry_banner_container"]) { self.backgroundColor = [UIColor blackColor]; }
|
||||
if ([self.accessibilityIdentifier isEqualToString:@"id.comment.comment_group_detail_container"]) { self.backgroundColor = [UIColor clearColor]; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue