eric6/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py

changeset 6986
23886c1dd3d0
parent 6942
2602857055c5
child 7009
eaf5ed6ef298
equal deleted inserted replaced
6985:6a2cab507874 6986:23886c1dd3d0
675 if closed: 675 if closed:
676 painter.drawRect(dot_x - 2, dot_y + 1, 676 painter.drawRect(dot_x - 2, dot_y + 1,
677 radius + 4, radius - 2) 677 radius + 4, radius - 2)
678 elif self.commandMode in ("incoming", "outgoing"): 678 elif self.commandMode in ("incoming", "outgoing"):
679 offset = radius // 2 679 offset = radius // 2
680 painter.drawConvexPolygon( 680 if self.commandMode == "incoming":
681 QPoint(dot_x + offset, dot_y), 681 # incoming, draw a down arrow
682 QPoint(dot_x, dot_y + offset), 682 painter.drawConvexPolygon(
683 QPoint(dot_x + offset, dot_y + 2 * offset), 683 QPoint(dot_x, dot_y),
684 QPoint(dot_x + 2 * offset, dot_y + offset) 684 QPoint(dot_x + 2 * offset, dot_y),
685 ) 685 QPoint(dot_x + offset, dot_y + 2 * offset)
686 )
687 else:
688 # outgoing, draw an up arrow
689 painter.drawConvexPolygon(
690 QPoint(dot_x + offset, dot_y),
691 QPoint(dot_x, dot_y + 2 * offset),
692 QPoint(dot_x + 2 * offset, dot_y + 2 * offset)
693 )
686 else: 694 else:
687 painter.drawEllipse(dot_x, dot_y, radius, radius) 695 painter.drawEllipse(dot_x, dot_y, radius, radius)
688 painter.end() 696 painter.end()
689 return QIcon(pix) 697 return QIcon(pix)
690 698

eric ide

mercurial