Improve selection visibility on tvOS

This commit is contained in:
Cameron Gutman
2019-08-30 22:33:32 -07:00
parent f2fa9e18ea
commit f6153fe818
2 changed files with 15 additions and 6 deletions

View File

@@ -909,10 +909,18 @@ static NSMutableSet* hostList;
}
- (float) getCompViewX:(UIComputerView*)comp addComp:(UIComputerView*)addComp prevEdge:(float)prevEdge {
float padding;
#if TARGET_OS_TV
padding = 100;
#else
padding = addComp.frame.size.width / 2;
#endif
if (prevEdge == -1) {
return hostScrollView.frame.origin.x + comp.frame.size.width / 2 + addComp.frame.size.width / 2;
return hostScrollView.frame.origin.x + comp.frame.size.width / 2 + padding;
} else {
return prevEdge + addComp.frame.size.width / 2 + comp.frame.size.width / 2;
return prevEdge + comp.frame.size.width / 2 + padding;
}
}