From d096fdb344d72954b0060afe11410290a3aa8de0 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Fri, 7 Jan 2022 20:06:18 +0100 Subject: [PATCH] Slightly more compact thumbnails badges --- Shared/Views/DetailBadge.swift | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Shared/Views/DetailBadge.swift b/Shared/Views/DetailBadge.swift index b38b43c4..5cd0dfc6 100644 --- a/Shared/Views/DetailBadge.swift +++ b/Shared/Views/DetailBadge.swift @@ -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)) } }