mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-04-21 11:52:00 +00:00
LowContrastMode v1.6.1
This commit is contained in:
parent
e14bf4b655
commit
416dfec969
1 changed files with 65 additions and 1 deletions
|
|
@ -16,7 +16,7 @@ static BOOL customContrastMode() {
|
||||||
|
|
||||||
UIColor *lcmHexColor;
|
UIColor *lcmHexColor;
|
||||||
|
|
||||||
%group gLowContrastMode // Low Contrast Mode v1.6.0 BETA (Compatible with only YouTube v17.33.2-v17.38.10)
|
%group gLowContrastMode // Low Contrast Mode v1.6.1 (Compatible with only YouTube v17.33.2-v18.34.5)
|
||||||
%hook UIColor
|
%hook UIColor
|
||||||
+ (UIColor *)whiteColor { // Dark Theme Color
|
+ (UIColor *)whiteColor { // Dark Theme Color
|
||||||
return [UIColor colorWithRed: 0.56 green: 0.56 blue: 0.56 alpha: 1.00];
|
return [UIColor colorWithRed: 0.56 green: 0.56 blue: 0.56 alpha: 1.00];
|
||||||
|
|
@ -131,6 +131,38 @@ UIColor *lcmHexColor;
|
||||||
return [UIColor whiteColor];
|
return [UIColor whiteColor];
|
||||||
}
|
}
|
||||||
%end
|
%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
|
%hook QTMColorGroup
|
||||||
- (UIColor *)tint100 {
|
- (UIColor *)tint100 {
|
||||||
return [UIColor whiteColor];
|
return [UIColor whiteColor];
|
||||||
|
|
@ -434,6 +466,38 @@ UIColor *lcmHexColor;
|
||||||
return lcmHexColor;
|
return lcmHexColor;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
%hook _ASDisplayView
|
||||||
|
- (void)layoutSubviews {
|
||||||
|
%orig;
|
||||||
|
for (UIView *subview in self.subviews) {
|
||||||
|
if ([subview.accessibilityLabel isEqualToString:@"connect account"]) {
|
||||||
|
subview.backgroundColor = lcmHexColor;
|
||||||
|
if ([subview isKindOfClass:[UILabel class]]) {
|
||||||
|
UILabel *label = (UILabel *)subview;
|
||||||
|
label.textColor = [UIColor blackColor];
|
||||||
|
}
|
||||||
|
} else if ([subview.accessibilityLabel isEqualToString:@"Thanks"]) {
|
||||||
|
subview.backgroundColor = lcmHexColor;
|
||||||
|
if ([subview isKindOfClass:[UILabel class]]) {
|
||||||
|
UILabel *label = (UILabel *)subview;
|
||||||
|
label.textColor = [UIColor blackColor];
|
||||||
|
}
|
||||||
|
} else if ([subview.accessibilityLabel isEqualToString:@"Save to playlist"]) {
|
||||||
|
subview.backgroundColor = lcmHexColor;
|
||||||
|
if ([subview isKindOfClass:[UILabel class]]) {
|
||||||
|
UILabel *label = (UILabel *)subview;
|
||||||
|
label.textColor = [UIColor blackColor];
|
||||||
|
}
|
||||||
|
} else if ([subview.accessibilityLabel isEqualToString:@"Report"]) {
|
||||||
|
subview.backgroundColor = lcmHexColor;
|
||||||
|
if ([subview isKindOfClass:[UILabel class]]) {
|
||||||
|
UILabel *label = (UILabel *)subview;
|
||||||
|
label.textColor = [UIColor blackColor];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%end
|
||||||
%hook QTMColorGroup
|
%hook QTMColorGroup
|
||||||
- (UIColor *)tint100 {
|
- (UIColor *)tint100 {
|
||||||
return [UIColor whiteColor];
|
return [UIColor whiteColor];
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue