mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
[AltWidget] Preserves layout if app icon is missing
This commit is contained in:
@@ -29,13 +29,11 @@ struct WidgetView : View
|
||||
VStack(alignment: .leading, spacing: 5) {
|
||||
let imageHeight = geometry.size.height * 0.45
|
||||
|
||||
app.icon.map {
|
||||
Image(uiImage: $0)
|
||||
.resizable()
|
||||
.aspectRatio(CGSize(width: 1, height: 1), contentMode: .fit)
|
||||
.frame(height: imageHeight)
|
||||
.mask(RoundedRectangle(cornerRadius: imageHeight / 5.0, style: .continuous))
|
||||
}
|
||||
Image(uiImage: app.icon ?? UIImage())
|
||||
.resizable()
|
||||
.aspectRatio(CGSize(width: 1, height: 1), contentMode: .fit)
|
||||
.frame(height: imageHeight)
|
||||
.mask(RoundedRectangle(cornerRadius: imageHeight / 5.0, style: .continuous))
|
||||
|
||||
Text(app.name.uppercased())
|
||||
.font(.system(size: 12, weight: .semibold, design: .rounded))
|
||||
|
||||
Reference in New Issue
Block a user