mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 13:33:42 +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
|
@Default(.roundedThumbnails) private var roundedThumbnails
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
Text(text)
|
let text = Text(text)
|
||||||
.truncationMode(.middle)
|
.truncationMode(.middle)
|
||||||
.padding(4)
|
.padding(4)
|
||||||
#if os(tvOS)
|
#if os(tvOS)
|
||||||
.padding(.horizontal, 5)
|
.padding(.horizontal, 5)
|
||||||
#endif
|
#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