diff --git a/Mist/Views/Components/TextRibbon.swift b/Mist/Views/Components/TextRibbon.swift index 0851f31..d8a31a1 100644 --- a/Mist/Views/Components/TextRibbon.swift +++ b/Mist/Views/Components/TextRibbon.swift @@ -10,15 +10,16 @@ import SwiftUI struct TextRibbon: View { var title: String var length: CGFloat - private let degrees: CGFloat = -45 + private let degrees: CGFloat = -45.001 + // app crashes when value is exactly -45 ¯\_(ツ)_/¯ var body: some View { Text(title) .foregroundColor(.white) .frame(width: length) .background(Color.accentColor) - .rotationEffect(.degrees(degrees)) .mask(Circle().frame(width: length, height: length)) + .rotationEffect(.degrees(degrees)) } } diff --git a/Mist/Views/List/ListRowDetail.swift b/Mist/Views/List/ListRowDetail.swift index 5143e31..b0c7f22 100644 --- a/Mist/Views/List/ListRowDetail.swift +++ b/Mist/Views/List/ListRowDetail.swift @@ -24,6 +24,7 @@ struct ListRowDetail: View { ScaledImage(name: imageName, length: length) if beta { TextRibbon(title: "BETA", length: length * 0.9) + .textSelection(.disabled) } } HStack(spacing: spacing) {