File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import SwiftUI
1414struct 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
You can’t perform that action at this time.
0 commit comments