HgLogBrowserDialog: changed the icon for incoming and outgoing changesets to make the changeset type more distinguishable.

Wed, 01 May 2019 17:29:21 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 01 May 2019 17:29:21 +0200
changeset 6986
23886c1dd3d0
parent 6985
6a2cab507874
child 6987
3371a03ed0a7

HgLogBrowserDialog: changed the icon for incoming and outgoing changesets to make the changeset type more distinguishable.

eric6/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py file | annotate | diff | comparison | revisions
--- a/eric6/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py	Wed May 01 16:19:42 2019 +0200
+++ b/eric6/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py	Wed May 01 17:29:21 2019 +0200
@@ -677,12 +677,20 @@
                              radius + 4, radius - 2)
         elif self.commandMode in ("incoming", "outgoing"):
             offset = radius // 2
-            painter.drawConvexPolygon(
-                QPoint(dot_x + offset, dot_y),
-                QPoint(dot_x, dot_y + offset),
-                QPoint(dot_x + offset, dot_y + 2 * offset),
-                QPoint(dot_x + 2 * offset, dot_y + offset)
-            )
+            if self.commandMode == "incoming":
+                # incoming, draw a down arrow
+                painter.drawConvexPolygon(
+                    QPoint(dot_x, dot_y),
+                    QPoint(dot_x + 2 * offset, dot_y),
+                    QPoint(dot_x + offset, dot_y + 2 * offset)
+                )
+            else:
+                # outgoing, draw an up arrow
+                painter.drawConvexPolygon(
+                    QPoint(dot_x + offset, dot_y),
+                    QPoint(dot_x, dot_y + 2 * offset),
+                    QPoint(dot_x + 2 * offset, dot_y + 2 * offset)
+                )
         else:
             painter.drawEllipse(dot_x, dot_y, radius, radius)
         painter.end()

eric ide

mercurial