From 92999118fd1c38abb659e75f361eed15056879f0 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Sat, 10 Dec 2022 22:43:14 +0100 Subject: [PATCH] Detail badges improvement --- Shared/Views/DetailBadge.swift | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Shared/Views/DetailBadge.swift b/Shared/Views/DetailBadge.swift index 175803c3..3a856b28 100644 --- a/Shared/Views/DetailBadge.swift +++ b/Shared/Views/DetailBadge.swift @@ -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)) } }