Fix uneven shortcut card heights on tvOS home screen

Always reserve space for the subtitle line so cards with and without
subtitles have consistent heights in the grid.
This commit is contained in:
Arkadiusz Fal
2026-04-05 20:22:04 +02:00
parent 0071e1b117
commit 240cf23693

View File

@@ -90,14 +90,12 @@ struct HomeShortcutCardView<StatusIndicator: View>: View {
}
}
if hasSubtitle {
Text(subtitle)
Text(hasSubtitle ? subtitle : " ")
.font(subtitleFont)
.foregroundStyle(.secondary)
.opacity(hasSubtitle ? 1 : 0)
}
}
.frame(minHeight: subtitleMinHeight, alignment: hasSubtitle ? .top : .center)
}
.frame(maxWidth: .infinity, alignment: .leading)
} else {
// Horizontal layout for standard sizes