Re-added “Fix streched artwork in uYou”

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.
This commit is contained in:
arichorn 2023-07-26 21:54:02 -05:00 committed by GitHub
parent 5e1064b8a6
commit 247ecde7ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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