mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 13:33:42 +00:00
Slightly more compact thumbnails badges
This commit is contained in:
parent
5b12dbcb1e
commit
d096fdb344
@ -1,3 +1,4 @@
|
||||
import Defaults
|
||||
import SwiftUI
|
||||
|
||||
struct DetailBadge: View {
|
||||
@ -82,12 +83,17 @@ struct DetailBadge: View {
|
||||
var text: String
|
||||
var style: Style = .default
|
||||
|
||||
@Default(.roundedThumbnails) private var roundedThumbnails
|
||||
|
||||
var body: some View {
|
||||
Text(text)
|
||||
.truncationMode(.middle)
|
||||
.padding(10)
|
||||
.padding(4)
|
||||
#if os(tvOS)
|
||||
.padding(.horizontal, 5)
|
||||
#endif
|
||||
.modifier(StyleModifier(style: style))
|
||||
.mask(RoundedRectangle(cornerRadius: 12))
|
||||
.mask(RoundedRectangle(cornerRadius: roundedThumbnails ? 6 : 0))
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user