mirror of
https://github.com/yattee/yattee.git
synced 2026-05-12 10:25:02 +00:00
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:
@@ -90,13 +90,11 @@ struct HomeShortcutCardView<StatusIndicator: View>: View {
|
||||
}
|
||||
}
|
||||
|
||||
if hasSubtitle {
|
||||
Text(subtitle)
|
||||
.font(subtitleFont)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
Text(hasSubtitle ? subtitle : " ")
|
||||
.font(subtitleFont)
|
||||
.foregroundStyle(.secondary)
|
||||
.opacity(hasSubtitle ? 1 : 0)
|
||||
}
|
||||
.frame(minHeight: subtitleMinHeight, alignment: hasSubtitle ? .top : .center)
|
||||
}
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user