Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>
This commit is contained in:
parent
a74d90cc8e
commit
a26c34dd7b
@ -20,23 +20,9 @@ struct TimeSegment: View {
|
||||
|
||||
var body: some View {
|
||||
HStack(alignment: .center, spacing: 0) {
|
||||
if text.count == 1 {
|
||||
// For single digits, center them by adding empty space on both sides
|
||||
ForEach(Array(text.enumerated()), id: \.offset) { index, character in
|
||||
DigitView(
|
||||
digit: " ",
|
||||
fontSize: fontSize,
|
||||
opacity: 0,
|
||||
digitColor: digitColor,
|
||||
glowIntensity: glowIntensity,
|
||||
fontFamily: fontFamily,
|
||||
fontWeight: fontWeight,
|
||||
fontDesign: fontDesign
|
||||
)
|
||||
.frame(width: digitWidth)
|
||||
.border(.red, width: 1)
|
||||
|
||||
DigitView(
|
||||
digit: text,
|
||||
digit: String(character),
|
||||
fontSize: fontSize,
|
||||
opacity: clampedOpacity,
|
||||
digitColor: digitColor,
|
||||
@ -47,22 +33,6 @@ struct TimeSegment: View {
|
||||
)
|
||||
.frame(width: digitWidth)
|
||||
.border(.red, width: 1)
|
||||
} else {
|
||||
// For multiple digits, display them normally
|
||||
ForEach(Array(text.enumerated()), id: \.offset) { index, character in
|
||||
DigitView(
|
||||
digit: String(character),
|
||||
fontSize: fontSize,
|
||||
opacity: clampedOpacity,
|
||||
digitColor: digitColor,
|
||||
glowIntensity: glowIntensity,
|
||||
fontFamily: fontFamily,
|
||||
fontWeight: fontWeight,
|
||||
fontDesign: fontDesign
|
||||
)
|
||||
.frame(width: digitWidth)
|
||||
.border(.red, width: 1)
|
||||
}
|
||||
}
|
||||
}
|
||||
.border(Color.green, width: 1)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user