mirror of
https://github.com/yattee/yattee.git
synced 2024-11-09 15:58:20 +00:00
Detail badges improvement
This commit is contained in:
parent
74d65f6ab8
commit
92999118fd
@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user