Mercurial > hg > easyhg
diff connectionitem.cpp @ 54:0e5fba6750c2
* Small rendering refinements
author | Chris Cannam |
---|---|
date | Fri, 12 Nov 2010 17:04:36 +0000 |
parents | 3c46b2ac45d3 |
children | f583e44d9d31 |
line wrap: on
line diff
--- a/connectionitem.cpp Fri Nov 12 16:48:18 2010 +0000 +++ b/connectionitem.cpp Fri Nov 12 17:04:36 2010 +0000 @@ -31,7 +31,14 @@ ColourSet *colourSet = ColourSet::instance(); QColor branchColour = colourSet->getColourFor(m_child->getChangeset()->branch()); - paint->setPen(QPen(branchColour, 2)); + + QTransform t = paint->worldTransform(); + float scale = std::min(t.m11(), t.m22()); + if (scale < 0.1) { + paint->setPen(QPen(branchColour, 0)); + } else { + paint->setPen(QPen(branchColour, 2)); + } float xscale = 100;