mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-03-11 21:26:04 +00:00
New Options (YouTube Logo Customization)
New YouTube Logo options! This provides more customization towards the YouTube Logo in uYouPlusExtra!
This commit is contained in:
parent
32d047a1e8
commit
bb28191fe4
1 changed files with 49 additions and 36 deletions
85
uYouPlus.xm
85
uYouPlus.xm
|
|
@ -142,8 +142,46 @@ static void repositionCreateTab(YTIGuideResponse *response) {
|
|||
}
|
||||
%end
|
||||
|
||||
// uYouPlusExtra Logo - #183
|
||||
%group gDefaultYouTubeLogo
|
||||
// Hide YouTube Logo - @dayanch96
|
||||
%group gHideYouTubeLogo
|
||||
%hook YTHeaderLogoController
|
||||
- (YTHeaderLogoController *)init {
|
||||
return NULL;
|
||||
}
|
||||
%end
|
||||
%hook YTNavigationBarTitleView
|
||||
- (void)layoutSubviews {
|
||||
%orig;
|
||||
if (self.subviews.count > 1 && [self.subviews[1].accessibilityIdentifier isEqualToString:@"id.yoodle.logo"]) {
|
||||
self.subviews[1].hidden = YES;
|
||||
}
|
||||
}
|
||||
%end
|
||||
%end
|
||||
|
||||
%group gCenterYouTubeLogo
|
||||
%hook YTNavigationBarTitleView
|
||||
- (BOOL)shouldCenterNavBarTitleView { return YES; }
|
||||
%end
|
||||
%end
|
||||
|
||||
// YouTube Premium Logo - @arichorn - this doesn't always function
|
||||
%group gPremiumYouTubeLogo
|
||||
%hook YTHeaderLogoController
|
||||
- (void)setPremiumLogo:(BOOL)isPremiumLogo {
|
||||
isPremiumLogo = YES;
|
||||
%orig;
|
||||
}
|
||||
- (BOOL)isPremiumLogo {
|
||||
return YES;
|
||||
}
|
||||
- (void)setTopbarLogoRenderer:(id)renderer {
|
||||
}
|
||||
%end
|
||||
%end
|
||||
|
||||
// uYouPlusExtra Logo - @arichorn & @dayanch96 - #183
|
||||
%group gCustomYouTubeLogo
|
||||
%hook YTHeaderLogoController
|
||||
- (id)logoView {
|
||||
id originalLogoView = %orig;
|
||||
|
|
@ -164,35 +202,7 @@ static void repositionCreateTab(YTIGuideResponse *response) {
|
|||
[logoView addSubview:customLogoView];
|
||||
}
|
||||
%end
|
||||
|
||||
%hook YTNavigationBarTitleView // Hide Original YouTube Logo - this prevents the custom Logo from Overlapping with the Original
|
||||
- (void)layoutSubviews {
|
||||
%orig;
|
||||
if (self.subviews.count > 1 && [self.subviews[1].accessibilityIdentifier isEqualToString:@"id.yoodle.logo"]) {
|
||||
self.subviews[1].hidden = YES;
|
||||
}
|
||||
}
|
||||
%end
|
||||
%end
|
||||
|
||||
// YouTube Premium Logo - @arichorn - this doesn't always function
|
||||
%group gPremiumYouTubeLogo
|
||||
%hook YTHeaderLogoController
|
||||
- (void)setPremiumLogo:(BOOL)isPremiumLogo {
|
||||
isPremiumLogo = YES;
|
||||
%orig;
|
||||
}
|
||||
- (BOOL)isPremiumLogo {
|
||||
return YES;
|
||||
}
|
||||
- (void)setTopbarLogoRenderer:(id)renderer {
|
||||
}
|
||||
%end
|
||||
%end
|
||||
|
||||
// Hide YouTube Logo - @dayanch96
|
||||
%group gHideYouTubeLogo
|
||||
%hook YTHeaderLogoController
|
||||
%hook YTHeaderLogoController // Hide Original YouTube Logo - this will prevent Overlapping on the custom YouTube Logo
|
||||
- (YTHeaderLogoController *)init {
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -1416,12 +1426,18 @@ static void replaceTab(YTIGuideResponse *response) {
|
|||
// dlopen([[NSString stringWithFormat:@"%@/Frameworks/uYou.dylib", [[NSBundle mainBundle] bundlePath]] UTF8String], RTLD_LAZY);
|
||||
|
||||
%init;
|
||||
if (IsEnabled(@"defaultYouTubeLogo_enabled")) {
|
||||
%init(gDefaultYouTubeLogo);
|
||||
if (IsEnabled(@"hideYouTubeLogo_enabled")) {
|
||||
%init(gHideYouTubeLogo);
|
||||
}
|
||||
if (IsEnabled(@"centerYouTubeLogo_enabled")) {
|
||||
%init(gCenterYouTubeLogo);
|
||||
}
|
||||
if (IsEnabled(@"premiumYouTubeLogo_enabled")) {
|
||||
%init(gPremiumYouTubeLogo);
|
||||
}
|
||||
if (IsEnabled(@"customYouTubeLogo_enabled")) {
|
||||
%init(gCustomYouTubeLogo);
|
||||
}
|
||||
if (IsEnabled(@"reExplore_enabled")) {
|
||||
%init(gReExplore);
|
||||
}
|
||||
|
|
@ -1467,9 +1483,6 @@ static void replaceTab(YTIGuideResponse *response) {
|
|||
if (IsEnabled(@"stockVolumeHUD_enabled")) {
|
||||
%init(gStockVolumeHUD);
|
||||
}
|
||||
if (IsEnabled(@"hideYouTubeLogo_enabled")) {
|
||||
%init(gHideYouTubeLogo);
|
||||
}
|
||||
if (IsEnabled(@"hideHeatwaves_enabled")) {
|
||||
%init(gHideHeatwaves);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue