Skip to content

Commit 4d4edd2

Browse files
author
Ipsky
committed
aesthetic tweaks
1 parent 90596c4 commit 4d4edd2

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

LineGraph/CurrentTimeIndicator.swift

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import SwiftUI
1414
struct CurrentTimeIndicator: View {
1515

1616
@EnvironmentObject var model: GraphModel
17+
@EnvironmentObject var bounds: Bounds
1718

1819
/// update this view every minute
1920
@State var date = Date()
@@ -24,7 +25,7 @@ struct CurrentTimeIndicator: View {
2425
let radius: CGFloat = 7
2526

2627
var body: some View {
27-
VStack(alignment: .trailing) {
28+
VStack(alignment: .center) {
2829
HStack(alignment: .center, spacing: .zero) {
2930
Circle()
3031
.foregroundColor(.red)
@@ -34,9 +35,11 @@ struct CurrentTimeIndicator: View {
3435
.frame(height: 1)
3536
}
3637
Text(time)
37-
.font(.system(.caption, design: .monospaced))
38+
.font( bounds.device == .iPhone
39+
? Font.system(.caption2, design: .monospaced)
40+
: Font.system(.caption, design: .monospaced)
41+
)
3842
.foregroundColor(.red)
39-
.padding(.trailing, radius)
4043
}
4144
/// allow the circle to bleed into the margin
4245
/// also nudge view upwards, ignoring the top half of the semi-circle

0 commit comments

Comments
 (0)