Skip to content

Commit

Permalink
Increase the size of nodes in trust graph slightly
Browse files Browse the repository at this point in the history
  • Loading branch information
xoriole committed Dec 19, 2020
1 parent 2c9508b commit 87fed8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tribler-gui/tribler_gui/widgets/trustgraphpage.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,13 +214,13 @@ def get_node_color(self, node, selected=False):

def get_node_size(self, node):
# User root node is bigger than normal nodes
min_size = 0.01 if node[u'key'] != self.root_public_key else 0.05
min_size = 0.01 if node[u'key'] != self.root_public_key else 0.1

diff = abs(node.get('total_up', 0) - node.get('total_down', 0))
if diff == 0:
return min_size
elif diff > 10 * TB: # max token balance limit
return 0.06 # max node size in graph
return 0.1 # max node size in graph
elif diff > TB:
return 0.05 + 0.005 * diff / TB # 0.005 for each extra TB of balance
return math.log(diff, 2) / 512 + min_size
Expand Down

0 comments on commit 87fed8c

Please sign in to comment.