From 42c97eafaa8f1bffd2c35d6b0a2ab5fa9d61b22f Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Thu, 29 Aug 2019 20:34:51 -0700 Subject: [PATCH] Fix slightly offset titles --- Limelight/UIAppView.m | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Limelight/UIAppView.m b/Limelight/UIAppView.m index 8c7061d..2094602 100644 --- a/Limelight/UIAppView.m +++ b/Limelight/UIAppView.m @@ -155,14 +155,16 @@ static UIImage* noImage; [_appLabel setNumberOfLines:0]; [_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 [_appLabel setFont:[UIFont systemFontOfSize:24]]; + [_appLabel setFrame: self.frame]; [_appButton addSubview:[self renderToImageView:noImage]]; #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]; [self addSubview:_appOverlay]; #endif