Mercurial > hg > easyhg
comparison src/connectionitem.cpp @ 506:470829a21f98
Identify closed branches and display them in a lighter shade
| author | Chris Cannam |
|---|---|
| date | Mon, 17 Oct 2011 22:08:05 +0100 |
| parents | ef31a55c86b6 |
| children | 2981d2defa61 |
comparison
equal
deleted
inserted
replaced
| 505:1c05e7576ea5 | 506:470829a21f98 |
|---|---|
| 53 if (!m_parent || !(m_child || m_uncommitted)) return; | 53 if (!m_parent || !(m_child || m_uncommitted)) return; |
| 54 QPainterPath p; | 54 QPainterPath p; |
| 55 | 55 |
| 56 paint->save(); | 56 paint->save(); |
| 57 | 57 |
| 58 int alpha = 255; | |
| 59 if (m_child && m_child->isClosed()) alpha = 90; | |
| 60 | |
| 58 ColourSet *colourSet = ColourSet::instance(); | 61 ColourSet *colourSet = ColourSet::instance(); |
| 59 QString branch; | 62 QString branch; |
| 60 if (m_child) branch = m_child->getChangeset()->branch(); | 63 if (m_child) branch = m_child->getChangeset()->branch(); |
| 61 else branch = m_uncommitted->branch(); | 64 else branch = m_uncommitted->branch(); |
| 62 QColor branchColour = colourSet->getColourFor(branch); | 65 QColor branchColour = colourSet->getColourFor(branch); |
| 66 | |
| 67 branchColour.setAlpha(alpha); | |
| 63 | 68 |
| 64 Qt::PenStyle ls = Qt::SolidLine; | 69 Qt::PenStyle ls = Qt::SolidLine; |
| 65 if (!m_child) ls = Qt::DashLine; | 70 if (!m_child) ls = Qt::DashLine; |
| 66 | 71 |
| 67 QTransform t = paint->worldTransform(); | 72 QTransform t = paint->worldTransform(); |
