mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-18 19:23:43 +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) {
|
VStack(alignment: .leading, spacing: 5) {
|
||||||
let imageHeight = geometry.size.height * 0.45
|
let imageHeight = geometry.size.height * 0.45
|
||||||
|
|
||||||
app.icon.map {
|
Image(uiImage: app.icon ?? UIImage())
|
||||||
Image(uiImage: $0)
|
.resizable()
|
||||||
.resizable()
|
.aspectRatio(CGSize(width: 1, height: 1), contentMode: .fit)
|
||||||
.aspectRatio(CGSize(width: 1, height: 1), contentMode: .fit)
|
.frame(height: imageHeight)
|
||||||
.frame(height: imageHeight)
|
.mask(RoundedRectangle(cornerRadius: imageHeight / 5.0, style: .continuous))
|
||||||
.mask(RoundedRectangle(cornerRadius: imageHeight / 5.0, style: .continuous))
|
|
||||||
}
|
|
||||||
|
|
||||||
Text(app.name.uppercased())
|
Text(app.name.uppercased())
|
||||||
.font(.system(size: 12, weight: .semibold, design: .rounded))
|
.font(.system(size: 12, weight: .semibold, design: .rounded))
|
||||||
|
|||||||
Reference in New Issue
Block a user