mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-06-15 21:21:45 +00:00
Fix slightly offset titles
This commit is contained in:
@@ -155,14 +155,16 @@ static UIImage* noImage;
|
|||||||
[_appLabel setNumberOfLines:0];
|
[_appLabel setNumberOfLines:0];
|
||||||
[_appLabel setText:_app.name];
|
[_appLabel setText:_app.name];
|
||||||
|
|
||||||
CGFloat padding = 4.f;
|
|
||||||
[_appLabel setFrame: CGRectMake(padding, padding, _appButton.frame.size.width - 2 * padding, _appButton.frame.size.height - 2 * padding)];
|
|
||||||
|
|
||||||
#if TARGET_OS_TV
|
#if TARGET_OS_TV
|
||||||
[_appLabel setFont:[UIFont systemFontOfSize:24]];
|
[_appLabel setFont:[UIFont systemFontOfSize:24]];
|
||||||
|
[_appLabel setFrame: self.frame];
|
||||||
|
|
||||||
[_appButton addSubview:[self renderToImageView:noImage]];
|
[_appButton addSubview:[self renderToImageView:noImage]];
|
||||||
#else
|
#else
|
||||||
|
// This padding doesn't work on Apple TV due to how we render into an ImageView
|
||||||
|
CGFloat padding = 4.f;
|
||||||
|
[_appLabel setFrame: CGRectMake(padding, padding, _appButton.frame.size.width - 2 * padding, _appButton.frame.size.height - 2 * padding)];
|
||||||
|
|
||||||
[_appButton addSubview:_appLabel];
|
[_appButton addSubview:_appLabel];
|
||||||
[self addSubview:_appOverlay];
|
[self addSubview:_appOverlay];
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user