mirror of
https://github.com/SoPat712/YTLitePlus.git
synced 2025-08-22 02:38:45 -04:00
LowContrastMode v1.6.1
The update that potentially changes the way LowContrastMode works. It now works with YouTube Versions 17.33.2-18.34.5. It’s no longer 17.33.2-17.38.10
This commit is contained in:

committed by
GitHub

parent
4833ba7b38
commit
607ac6fee7
@@ -13,7 +13,7 @@ static BOOL customContrastMode() {
|
||||
|
||||
UIColor *lcmHexColor;
|
||||
|
||||
%group gLowContrastMode // Low Contrast Mode v1.6.0 (Compatible with only YouTube v16.46.5-v17.38.10)
|
||||
%group gLowContrastMode // Low Contrast Mode v1.6.1 (Compatible with only YouTube v17.33.2-v18.34.5)
|
||||
%hook UIColor
|
||||
+ (UIColor *)whiteColor { // Dark Theme Color
|
||||
return [UIColor colorWithRed: 0.56 green: 0.56 blue: 0.56 alpha: 1.00];
|
||||
@@ -101,6 +101,38 @@ UIColor *lcmHexColor;
|
||||
return [UIColor whiteColor];
|
||||
}
|
||||
%end
|
||||
%hook _ASDisplayView
|
||||
- (void)layoutSubviews {
|
||||
%orig;
|
||||
for (UIView *subview in self.subviews) {
|
||||
if ([subview.accessibilityLabel isEqualToString:@"connect account"]) {
|
||||
subview.backgroundColor = [UIColor whiteColor];
|
||||
if ([subview isKindOfClass:[UILabel class]]) {
|
||||
UILabel *label = (UILabel *)subview;
|
||||
label.textColor = [UIColor blackColor];
|
||||
}
|
||||
} else if ([subview.accessibilityLabel isEqualToString:@"Thanks"]) {
|
||||
subview.backgroundColor = [UIColor whiteColor];
|
||||
if ([subview isKindOfClass:[UILabel class]]) {
|
||||
UILabel *label = (UILabel *)subview;
|
||||
label.textColor = [UIColor blackColor];
|
||||
}
|
||||
} else if ([subview.accessibilityLabel isEqualToString:@"Save to playlist"]) {
|
||||
subview.backgroundColor = [UIColor whiteColor];
|
||||
if ([subview isKindOfClass:[UILabel class]]) {
|
||||
UILabel *label = (UILabel *)subview;
|
||||
label.textColor = [UIColor blackColor];
|
||||
}
|
||||
} else if ([subview.accessibilityLabel isEqualToString:@"Report"]) {
|
||||
subview.backgroundColor = [UIColor whiteColor];
|
||||
if ([subview isKindOfClass:[UILabel class]]) {
|
||||
UILabel *label = (UILabel *)subview;
|
||||
label.textColor = [UIColor blackColor];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
%end
|
||||
%hook QTMColorGroup
|
||||
- (UIColor *)tint100 {
|
||||
return [UIColor whiteColor];
|
||||
|
Reference in New Issue
Block a user