mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-03-11 17:15:32 +00:00
Updated YTCommonColorPalette
Instead of UIView, I decided to do the implementation in a safer way due to new methods I found.
This commit is contained in:
parent
d07ecb7428
commit
09ef1f54dd
1 changed files with 18 additions and 0 deletions
|
|
@ -18,6 +18,12 @@ static BOOL oldDarkTheme() {
|
|||
%group gOldDarkTheme
|
||||
UIColor *customColor = [UIColor colorWithRed:0.129 green:0.129 blue:0.129 alpha:1.0];
|
||||
%hook YTCommonColorPalette
|
||||
- (UIColor *)background1 {
|
||||
return self.pageStyle == 1 ? customColor : %orig;
|
||||
}
|
||||
- (UIColor *)background2 {
|
||||
return self.pageStyle == 1 ? customColor : %orig;
|
||||
}
|
||||
- (UIColor *)brandBackgroundSolid {
|
||||
return self.pageStyle == 1 ? customColor : %orig;
|
||||
}
|
||||
|
|
@ -36,6 +42,9 @@ UIColor *customColor = [UIColor colorWithRed:0.129 green:0.129 blue:0.129 alpha:
|
|||
- (UIColor *)generalBackgroundA {
|
||||
return self.pageStyle == 1 ? customColor : %orig;
|
||||
}
|
||||
- (UIColor *)generalBackgroundB {
|
||||
return self.pageStyle == 1 ? customColor : %orig;
|
||||
}
|
||||
%end
|
||||
%hook SponsorBlockSettingsController
|
||||
- (void)viewDidLoad {
|
||||
|
|
@ -364,6 +373,12 @@ UIColor *customColor = [UIColor colorWithRed:0.129 green:0.129 blue:0.129 alpha:
|
|||
UIColor* raisedColor = [UIColor blackColor];
|
||||
%group gOLED
|
||||
%hook YTCommonColorPalette
|
||||
- (UIColor *)background1 {
|
||||
return self.pageStyle == 1 ? [UIColor blackColor] : %orig;
|
||||
}
|
||||
- (UIColor *)background2 {
|
||||
return self.pageStyle == 1 ? [UIColor blackColor] : %orig;
|
||||
}
|
||||
- (UIColor *)brandBackgroundSolid {
|
||||
return self.pageStyle == 1 ? [UIColor blackColor] : %orig;
|
||||
}
|
||||
|
|
@ -382,6 +397,9 @@ UIColor* raisedColor = [UIColor blackColor];
|
|||
- (UIColor *)generalBackgroundA {
|
||||
return self.pageStyle == 1 ? [UIColor blackColor] : %orig;
|
||||
}
|
||||
- (UIColor *)generalBackgroundB {
|
||||
return self.pageStyle == 1 ? [UIColor blackColor] : %orig;
|
||||
}
|
||||
%end
|
||||
%hook SponsorBlockSettingsController
|
||||
- (void)viewDidLoad {
|
||||
|
|
|
|||
Loading…
Reference in a new issue