Commits

Yuya Nishihara  committed 363608a

repomodel: narrow margin around graph edges to save horizontal space

Since each row has only one node, "1r" is enough to avoid collision of node
and edges. But diamond node for unapplied patch exceeds the defined "r"
(=dotradius), so it assumes max(r) = rowheight / 2.

  • Participants
  • Parent commits 7b23528

Comments (0)

Files changed (1)

File tortoisehg/hgqt/repomodel.py

         return self._branch_colors[branch]
 
     def col2x(self, col):
-        return 2 * self.dotradius * col + self.dotradius/2 + 8
+        # ignore dotradius because MQ diamond exceeds the defined size
+        maxradius = self.rowheight / 2
+        return maxradius * (col + 1)
 
     def graphctx(self, ctx, gnode):
         w = self.col2x(gnode.cols)