comparison src/changesetdetailitem.cpp @ 672:88fa1544b407

Merge from branch qt5. There's much more to be done before we can make another release, but clearly it's going to be done using qt5
author Chris Cannam
date Wed, 05 Dec 2018 09:44:10 +0000
parents ce29dc775650
children c0b46d0514a7 751b21af6b6f
comparison
equal deleted inserted replaced
665:88061103b878 672:88fa1544b407
63 return v; 63 return v;
64 } 64 }
65 65
66 void 66 void
67 ChangesetDetailItem::paint(QPainter *paint, 67 ChangesetDetailItem::paint(QPainter *paint,
68 const QStyleOptionGraphicsItem *option, 68 const QStyleOptionGraphicsItem *,
69 QWidget *w) 69 QWidget *)
70 { 70 {
71 paint->save(); 71 paint->save();
72 72
73 ColourSet *colourSet = ColourSet::instance(); 73 ColourSet *colourSet = ColourSet::instance();
74 QColor branchColour = colourSet->getColourFor(m_changeset->branch()); 74 QColor branchColour = colourSet->getColourFor(m_changeset->branch());
75 QColor userColour = colourSet->getColourFor(m_changeset->author());
76 75
77 QTransform t = paint->worldTransform(); 76 QTransform t = paint->worldTransform();
78 float scale = std::min(t.m11(), t.m22()); 77 float scale = std::min(t.m11(), t.m22());
79 78
80 if (scale < 0.1) { 79 if (scale < 0.1) {
103 pts.push_back(QPointF(0, height/3 + 5)); 102 pts.push_back(QPointF(0, height/3 + 5));
104 pts.push_back(QPointF(-10, height/3)); 103 pts.push_back(QPointF(-10, height/3));
105 pts.push_back(QPointF(0, height/3 - 5)); 104 pts.push_back(QPointF(0, height/3 - 5));
106 paint->drawPolygon(QPolygonF(pts)); 105 paint->drawPolygon(QPolygonF(pts));
107 106
108 /*
109 paint->setBrush(branchColour);
110 QVector<QPointF> pts;
111 pts.push_back(QPointF(width/2 - 5, 0));
112 pts.push_back(QPointF(width/2 + 5, 0));
113 pts.push_back(QPointF(width/2, -10));
114 pts.push_back(QPointF(width/2 - 5, 0));
115 paint->drawPolygon(QPolygonF(pts));
116 */
117 m_doc->drawContents(paint, r); 107 m_doc->drawContents(paint, r);
118 108
119 paint->restore(); 109 paint->restore();
120 } 110 }
121 111