From 247ecde7ce9ff53ee4e49e529f4142b0f6ba5422 Mon Sep 17 00:00:00 2001 From: arichorn <78001398+arichorn@users.noreply.github.com> Date: Wed, 26 Jul 2023 21:54:02 -0500 Subject: [PATCH] =?UTF-8?q?Re-added=20=E2=80=9CFix=20streched=20artwork=20?= =?UTF-8?q?in=20uYou=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit uYou 3.0.1 was supposed to have this but it wasn’t included in there. So I have re-added this patch back to uYouPlus. --- uYouPlus.xm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/uYouPlus.xm b/uYouPlus.xm index c1059ea..5d07a56 100644 --- a/uYouPlus.xm +++ b/uYouPlus.xm @@ -143,6 +143,21 @@ static void repositionCreateTab(YTIGuideResponse *response) { %end */ +// Fix streched artwork in uYou's player view +%hook ArtworkImageView +- (id)imageView { + UIImageView * imageView = %orig; + imageView.contentMode = UIViewContentModeScaleAspectFit; + // Make artwork a bit bigger + UIView *artworkImageView = imageView.superview; + if (artworkImageView != nil && !artworkImageView.translatesAutoresizingMaskIntoConstraints) { + [artworkImageView.leftAnchor constraintEqualToAnchor:artworkImageView.superview.leftAnchor constant:16].active = YES; + [artworkImageView.rightAnchor constraintEqualToAnchor:artworkImageView.superview.rightAnchor constant:-16].active = YES; + } + return imageView; +} +%end + # pragma mark - Tweaks // IAmYouTube - https://github.com/PoomSmart/IAmYouTube/ %hook YTVersionUtils