mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-04-19 09:52:05 +00:00
Update LowContrastMode.xm
This commit is contained in:
parent
6b0c1424ea
commit
f310fd4680
1 changed files with 15 additions and 1 deletions
|
|
@ -13,7 +13,7 @@ static BOOL customContrastMode() {
|
|||
|
||||
UIColor *lcmHexColor;
|
||||
|
||||
%group gLowContrastMode // Low Contrast Mode v1.5.2 (Compatible with only YouTube v17.33.2-v17.38.10)
|
||||
%group gLowContrastMode // Low Contrast Mode v1.6.0 BETA (Compatible with only YouTube v17.33.2-v17.38.10)
|
||||
%hook UIColor
|
||||
+ (UIColor *)whiteColor { // Dark Theme Color
|
||||
return [UIColor colorWithRed: 0.56 green: 0.56 blue: 0.56 alpha: 1.00];
|
||||
|
|
@ -246,12 +246,21 @@ UIColor *lcmHexColor;
|
|||
[modifiedAttributes setObject:[UIColor whiteColor] forKey:NSForegroundColorAttributeName];
|
||||
%orig(modifiedAttributes, state);
|
||||
}
|
||||
- (void)setCustomTitleTextAttributes:(NSDictionary *)attributes forState:(UIControlState)state {
|
||||
NSMutableDictionary *customAttributes = [NSMutableDictionary dictionaryWithDictionary:attributes];
|
||||
[customAttributes setObject:[UIColor whiteColor] forKey:NSForegroundColorAttributeName];
|
||||
%orig(customAttributes, state);
|
||||
}
|
||||
%end
|
||||
%hook UIButton
|
||||
- (void)setTitleColor:(UIColor *)color forState:(UIControlState)state {
|
||||
color = [UIColor whiteColor];
|
||||
%orig(color, state);
|
||||
}
|
||||
- (void)setCustomTitleColor:(UIColor *)color forState:(UIControlState)state {
|
||||
color = [UIColor whiteColor];
|
||||
%orig(color, state);
|
||||
}
|
||||
%end
|
||||
%hook UIBarButtonItem
|
||||
- (void)setTitleTextAttributes:(NSDictionary *)attributes forState:(UIControlState)state {
|
||||
|
|
@ -259,6 +268,11 @@ UIColor *lcmHexColor;
|
|||
[modifiedAttributes setObject:[UIColor whiteColor] forKey:NSForegroundColorAttributeName];
|
||||
%orig(modifiedAttributes, state);
|
||||
}
|
||||
- (void)setCustomTitleTextAttributes:(NSDictionary *)attributes forState:(UIControlState)state {
|
||||
NSMutableDictionary *customAttributes = [NSMutableDictionary dictionaryWithDictionary:attributes];
|
||||
[customAttributes setObject:[UIColor whiteColor] forKey:NSForegroundColorAttributeName];
|
||||
%orig(customAttributes, state);
|
||||
}
|
||||
%end
|
||||
%hook NSAttributedString
|
||||
- (instancetype)initWithString:(NSString *)str attributes:(NSDictionary<NSAttributedStringKey, id> *)attrs {
|
||||
|
|
|
|||
Loading…
Reference in a new issue