Patchwork repoview: increase the size of pentagon to match circle area

login
register
mail settings
Submitter Pierre-Yves David
Date Dec. 17, 2014, 8:56 p.m.
Message ID <b746045044b1b8fa5f85.1418849807@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/7150/
State Not Applicable
Headers show

Comments

Pierre-Yves David - Dec. 17, 2014, 8:56 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1418849566 28800
#      Wed Dec 17 12:52:46 2014 -0800
# Node ID b746045044b1b8fa5f85d0b8b852864883703c08
# Parent  35c14c46befb10512ad2a1ec90fa02b9a78cb178
repoview: increase the size of pentagon to match circle area

The pentagon have less area for the same outer radius. as the result, the
pentagon seems smaller. We bump the size a bit to match the circle area.
Sean Farley - Dec. 17, 2014, 11:18 p.m.
Pierre-Yves David writes:

> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@fb.com>
> # Date 1418849566 28800
> #      Wed Dec 17 12:52:46 2014 -0800
> # Node ID b746045044b1b8fa5f85d0b8b852864883703c08
> # Parent  35c14c46befb10512ad2a1ec90fa02b9a78cb178
> repoview: increase the size of pentagon to match circle area
>
> The pentagon have less area for the same outer radius. as the result, the
> pentagon seems smaller. We bump the size a bit to match the circle area.
>
> diff --git a/tortoisehg/hgqt/repoview.py b/tortoisehg/hgqt/repoview.py
> --- a/tortoisehg/hgqt/repoview.py
> +++ b/tortoisehg/hgqt/repoview.py
> @@ -573,11 +573,11 @@ class GraphDelegate(QStyledItemDelegate)
>              symbol = closesymbol
>          elif gnode.shape == graph.NODE_SHAPE_REVISION_SECRET:
>              symbolsize = 0.45 * radius
>              symbol = square
>          elif gnode.shape == graph.NODE_SHAPE_REVISION_DRAFT:
> -            symbolsize = 0.5 * radius
> +            symbolsize = 0.57 * radius

Wrong list?
Pierre-Yves David - Dec. 17, 2014, 11:19 p.m.
On 12/17/2014 03:18 PM, Sean Farley wrote:
>
> Pierre-Yves David writes:
>
>> # HG changeset patch
>> # User Pierre-Yves David <pierre-yves.david@fb.com>
>> # Date 1418849566 28800
>> #      Wed Dec 17 12:52:46 2014 -0800
>> # Node ID b746045044b1b8fa5f85d0b8b852864883703c08
>> # Parent  35c14c46befb10512ad2a1ec90fa02b9a78cb178
>> repoview: increase the size of pentagon to match circle area
>>
>> The pentagon have less area for the same outer radius. as the result, the
>> pentagon seems smaller. We bump the size a bit to match the circle area.
>>
>> diff --git a/tortoisehg/hgqt/repoview.py b/tortoisehg/hgqt/repoview.py
>> --- a/tortoisehg/hgqt/repoview.py
>> +++ b/tortoisehg/hgqt/repoview.py
>> @@ -573,11 +573,11 @@ class GraphDelegate(QStyledItemDelegate)
>>               symbol = closesymbol
>>           elif gnode.shape == graph.NODE_SHAPE_REVISION_SECRET:
>>               symbolsize = 0.45 * radius
>>               symbol = square
>>           elif gnode.shape == graph.NODE_SHAPE_REVISION_DRAFT:
>> -            symbolsize = 0.5 * radius
>> +            symbolsize = 0.57 * radius
>
> Wrong list?

yop, I need to check my email config in my thg repo.

Patch

diff --git a/tortoisehg/hgqt/repoview.py b/tortoisehg/hgqt/repoview.py
--- a/tortoisehg/hgqt/repoview.py
+++ b/tortoisehg/hgqt/repoview.py
@@ -573,11 +573,11 @@  class GraphDelegate(QStyledItemDelegate)
             symbol = closesymbol
         elif gnode.shape == graph.NODE_SHAPE_REVISION_SECRET:
             symbolsize = 0.45 * radius
             symbol = square
         elif gnode.shape == graph.NODE_SHAPE_REVISION_DRAFT:
-            symbolsize = 0.5 * radius
+            symbolsize = 0.57 * radius
             symbol = lambda size: polygon(size, 5)
         else:
             symbolsize = 0.5 * radius
             symbol = circle