Mercurial > hg > easyhg
comparison src/connectionitem.cpp @ 387:ce6a70970808 item_appearance_adjustments
Use a plain small circle for merge commits
author | Chris Cannam |
---|---|
date | Tue, 24 May 2011 16:26:15 +0100 |
parents | b9c153e00e84 |
children | ef31a55c86b6 |
comparison
equal
deleted
inserted
replaced
386:7ef46fb73b48 | 387:ce6a70970808 |
---|---|
39 } else { | 39 } else { |
40 c_col = m_uncommitted->column(); c_row = m_uncommitted->row(); | 40 c_col = m_uncommitted->column(); c_row = m_uncommitted->row(); |
41 } | 41 } |
42 | 42 |
43 return QRectF(xscale * c_col + size/2 - 2, | 43 return QRectF(xscale * c_col + size/2 - 2, |
44 yscale * c_row + size - 2, | 44 yscale * c_row + size - 22, |
45 xscale * p_col - xscale * c_col + 4, | 45 xscale * p_col - xscale * c_col + 4, |
46 yscale * p_row - yscale * c_row - size + 4) | 46 yscale * p_row - yscale * c_row - size + 44) |
47 .normalized(); | 47 .normalized(); |
48 } | 48 } |
49 | 49 |
50 void | 50 void |
51 ConnectionItem::paint(QPainter *paint, const QStyleOptionGraphicsItem *, QWidget *) | 51 ConnectionItem::paint(QPainter *paint, const QStyleOptionGraphicsItem *, QWidget *) |
123 if (abs(p_row - c_row) > 1) { | 123 if (abs(p_row - c_row) > 1) { |
124 p.lineTo(p_x, yscale * p_row); | 124 p.lineTo(p_x, yscale * p_row); |
125 } | 125 } |
126 } | 126 } |
127 | 127 |
128 // ensure line reaches the node -- again doesn't matter if we | |
129 // overshoot | |
130 p.lineTo(p_x, yscale * p_row + 20); | |
131 | |
128 paint->drawPath(p); | 132 paint->drawPath(p); |
129 paint->restore(); | 133 paint->restore(); |
130 } | 134 } |
131 | 135 |
132 | 136 |