mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-06-18 14:41:14 +00:00
Hide shadows on hidden app tiles
This commit is contained in:
@@ -220,6 +220,11 @@ static UIImage* noImage;
|
|||||||
[self updateAppImage];
|
[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
|
// Update opacity if neccessary
|
||||||
[self setAlpha:_app.hidden ? 0.4 : 1.0];
|
[self setAlpha:_app.hidden ? 0.4 : 1.0];
|
||||||
|
|
||||||
|
|||||||
@@ -1298,12 +1298,12 @@ static NSMutableSet* hostList;
|
|||||||
[cell.subviews.firstObject removeFromSuperview]; // Remove a view that was previously added
|
[cell.subviews.firstObject removeFromSuperview]; // Remove a view that was previously added
|
||||||
[cell addSubview:appView];
|
[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];
|
UIBezierPath *shadowPath = [UIBezierPath bezierPathWithRect:cell.bounds];
|
||||||
cell.layer.masksToBounds = NO;
|
cell.layer.masksToBounds = NO;
|
||||||
cell.layer.shadowColor = [UIColor blackColor].CGColor;
|
cell.layer.shadowColor = [UIColor blackColor].CGColor;
|
||||||
cell.layer.shadowOffset = CGSizeMake(1.0f, 5.0f);
|
cell.layer.shadowOffset = CGSizeMake(1.0f, 5.0f);
|
||||||
cell.layer.shadowOpacity = 0.5f;
|
|
||||||
cell.layer.shadowPath = shadowPath.CGPath;
|
cell.layer.shadowPath = shadowPath.CGPath;
|
||||||
|
|
||||||
#if !TARGET_OS_TV
|
#if !TARGET_OS_TV
|
||||||
|
|||||||
Reference in New Issue
Block a user