@@ -38,6 +38,7 @@ struct TimeRulerView: View
3838
3939 func drawMarkers( context: GraphicsContext , startSeconds: Double , endSeconds: Double , secondsToPixels: Double , size: CGSize )
4040 {
41+ let y = 15.0
4142 if let tracks = self . timeline. tracks
4243 {
4344 let markerRange = tracks. markers. startIndex ..< tracks. markers. endIndex
@@ -54,29 +55,41 @@ struct TimeRulerView: View
5455 Text ( " \( Image ( systemName: " arrowtriangle.down.fill " ) ) " )
5556 . font ( . system( size: 10 ) )
5657 . foregroundStyle ( . red) ,
57- at: CGPoint ( x: x + 0.5 , y: 21 ) )
58+ at: CGPoint ( x: x + 0.5 , y: y) ,
59+ )
5860
5961
6062 context. draw (
6163 Text ( text)
6264 . font ( . system( size: 10 ) )
63- . foregroundStyle ( . white) ,
64- at: CGPoint ( x: x , y: 12 ) )
65+ . foregroundStyle ( . red) ,
66+ at: CGPoint ( x: x + 9 , y: y - 2.0 ) ,
67+ anchor: UnitPoint ( x: 0 , y: 0.5 )
68+ )
6569 }
6670 else
6771 {
6872 context. draw (
6973 Text ( " \( Image ( systemName: " arrowtriangle.down.fill " ) ) " )
7074 . font ( . system( size: 10 ) )
7175 . foregroundColor ( . red) ,
72- at: CGPoint ( x: x + 0.5 , y: 21 ) )
76+ at: CGPoint ( x: x + 0.5 , y: y) ,
77+ )
7378
7479 context. draw (
7580 Text ( text)
7681 . font ( . system( size: 10 ) )
77- . foregroundColor ( . orange) ,
78- at: CGPoint ( x: x , y: 12 ) )
82+ . foregroundColor ( . red) ,
83+ at: CGPoint ( x: x + 9 , y: y - 2.0 ) ,
84+ anchor: UnitPoint ( x: 0 , y: 0.5 )
85+ )
7986 }
87+
88+ let tickHeight = 20.0
89+
90+ // Draw tick line
91+ let tickRect = CGRect ( x: x, y: size. height - tickHeight, width: 1 , height: tickHeight)
92+ context. fill ( Path ( tickRect) , with: . color( . red) )
8093 }
8194 }
8295 }
@@ -177,7 +190,7 @@ struct TimeRulerView: View
177190
178191 context. draw (
179192 Text ( currentTimeLabel)
180- . font ( . system( size: 10 ) )
193+ . font ( . system( size: 10 , weight : . bold ) )
181194 . foregroundStyle ( . orange) ,
182195 at: CGPoint ( x: playheadPositionX, y: 5 ) )
183196 }
@@ -191,7 +204,7 @@ struct TimeRulerView: View
191204
192205 context. draw (
193206 Text ( currentTimeLabel)
194- . font ( . system( size: 10 ) )
207+ . font ( . system( size: 10 , weight : . bold ) )
195208 . foregroundColor ( . orange) ,
196209 at: CGPoint ( x: playheadPositionX, y: 5 ) )
197210 }
0 commit comments