mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-02-16 02:20:53 +00:00
Hide shadows on hidden app tiles
This commit is contained in:
@@ -220,6 +220,11 @@ static UIImage* noImage;
|
||||
[self updateAppImage];
|
||||
}
|
||||
|
||||
// Show no shadow for hidden apps. Because we adjust the opacity of the
|
||||
// cells for hidden apps, it makes them look bad when the shadow draws
|
||||
// through the app tile.
|
||||
self.superview.layer.shadowOpacity = _app.hidden ? 0.0f : 0.5f;
|
||||
|
||||
// Update opacity if neccessary
|
||||
[self setAlpha:_app.hidden ? 0.4 : 1.0];
|
||||
|
||||
|
||||
@@ -1297,13 +1297,13 @@ static NSMutableSet* hostList;
|
||||
|
||||
[cell.subviews.firstObject removeFromSuperview]; // Remove a view that was previously added
|
||||
[cell addSubview:appView];
|
||||
|
||||
|
||||
// Shadow opacity is controlled inside UIAppView based on whether the app
|
||||
// is hidden or not during the update cycle.
|
||||
UIBezierPath *shadowPath = [UIBezierPath bezierPathWithRect:cell.bounds];
|
||||
cell.layer.masksToBounds = NO;
|
||||
cell.layer.shadowColor = [UIColor blackColor].CGColor;
|
||||
cell.layer.shadowOffset = CGSizeMake(1.0f, 5.0f);
|
||||
cell.layer.shadowOpacity = 0.5f;
|
||||
cell.layer.shadowPath = shadowPath.CGPath;
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
|
||||
Reference in New Issue
Block a user