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