| 1147 | return nondark_commits |
| 1148 | |
| 1149 | def draw_ref(self, commit, top, i=0, text="HEAD", color=m.BLUE): |
| 1150 | refText = m.Text( |
| 1151 | text, |
| 1152 | font=self.font, |
| 1153 | font_size=20, |
| 1154 | color=self.fontColor, |
| 1155 | weight=self.font_weight, |
| 1156 | ) |
| 1157 | refbox = m.Rectangle( |
| 1158 | color=color, |
| 1159 | fill_color=color, |
| 1160 | fill_opacity=self.ref_fill_opacity, |
| 1161 | height=0.4, |
| 1162 | width=refText.width + 0.25, |
| 1163 | ) |
| 1164 | refbox.next_to(top, m.UP) |
| 1165 | refText.move_to(refbox.get_center()) |
| 1166 | |
| 1167 | ref = m.VGroup(refbox, refText) |
| 1168 | |
| 1169 | if settings.animate: |
| 1170 | self.play(m.Create(ref), run_time=1 / settings.speed) |
| 1171 | else: |
| 1172 | self.add(ref) |
| 1173 | |
| 1174 | self.toFadeOut.add(ref) |
| 1175 | self.drawnRefs[text] = ref |
| 1176 | self.prevRef = ref |
| 1177 | |
| 1178 | if i == 0 and self.first_parse: |
| 1179 | self.topref = self.prevRef |
| 1180 | |
| 1181 | def draw_dark_ref(self): |
| 1182 | refRec = m.Rectangle( |