1
0
mirror of https://github.com/yattee/yattee.git synced 2025-04-27 07:20:32 +05:30

Detail badges improvement

This commit is contained in:
Arkadiusz Fal 2022-12-10 22:43:14 +01:00
parent 74d65f6ab8
commit 92999118fd

View File

@ -77,14 +77,22 @@ struct DetailBadge: View {
@Default(.roundedThumbnails) private var roundedThumbnails
var body: some View {
Text(text)
let text = Text(text)
.truncationMode(.middle)
.padding(4)
#if os(tvOS)
.padding(.horizontal, 5)
#endif
.modifier(StyleModifier(style: style))
.mask(RoundedRectangle(cornerRadius: roundedThumbnails ? 6 : 0))
Group {
if style == .default {
text
} else {
text
.modifier(StyleModifier(style: style))
}
}
.mask(RoundedRectangle(cornerRadius: roundedThumbnails ? 6 : 0))
}
}