@@ -305,30 +305,34 @@ def draw_commit(self, commit, i, prevCircle, shift=numpy.array([0.0, 0.0, 0.0]))
305305 commitMessage [j : j + 20 ] for j in range (0 , len (commitMessage ), 20 )
306306 )[:100 ],
307307 font = "Monospace" ,
308- font_size = 14 ,
308+ font_size = 20 if settings . highlight_commit_messages else 14 ,
309309 color = self .fontColor ,
310+ weight = m .BOLD if settings .highlight_commit_messages else m .NORMAL ,
310311 ).next_to (circle , m .DOWN )
311312
312313 if settings .animate and commit != "dark" and isNewCommit :
313314 self .play (
314315 self .camera .frame .animate .move_to (circle .get_center ()),
315316 m .Create (circle ),
316- m .AddTextLetterByLetter (commitId ),
317+ m .Text ( "" ) if settings . highlight_commit_messages else m . AddTextLetterByLetter (commitId ),
317318 m .AddTextLetterByLetter (message ),
318319 run_time = 1 / settings .speed ,
319320 )
320321 elif isNewCommit :
321- self .add (circle , commitId , message )
322+ self .add (circle , m . Text ( "" ) if settings . highlight_commit_messages else commitId , message )
322323 else :
323- return commitId , circle , arrow , hide_refs
324+ return m . Text ( "" ) if settings . highlight_commit_messages else commitId , circle , arrow , hide_refs
324325
325326 if commit != "dark" :
326327 self .drawnCommits [commit .hexsha ] = circle
327328 group = m .Group (circle , commitId , message )
328329 self .add_group_to_author_groups (commit .author .name , group )
329330
330331 self .toFadeOut .add (circle , commitId , message )
331- self .prevRef = commitId
332+ if settings .highlight_commit_messages :
333+ self .prevRef = circle
334+ else :
335+ self .prevRef = commitId
332336
333337 return commitId , circle , arrow , hide_refs
334338
@@ -362,7 +366,10 @@ def draw_head(self, commit, i, commitId):
362366 headbox = m .Rectangle (color = m .BLUE , fill_color = m .BLUE , fill_opacity = 0.25 )
363367 headbox .width = 1
364368 headbox .height = 0.4
365- headbox .next_to (commitId , m .UP )
369+ if settings .highlight_commit_messages :
370+ headbox .next_to (self .drawnCommits [commit .hexsha ], m .UP )
371+ else :
372+ headbox .next_to (commitId , m .UP )
366373 headText = m .Text (
367374 "HEAD" , font = "Monospace" , font_size = 20 , color = self .fontColor
368375 ).move_to (headbox .get_center ())
0 commit comments