Mercurial > hg > easyhg
changeset 649:35b0a7aa1fc1
Show tag on merge commit (fixing #534)
author | Chris Cannam |
---|---|
date | Thu, 24 Jan 2013 15:05:40 +0000 |
parents | b55466f7b8bf |
children | cfaede84ad9d |
files | src/changesetitem.cpp |
diffstat | 1 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/changesetitem.cpp Thu Jan 24 14:02:50 2013 +0000 +++ b/src/changesetitem.cpp Thu Jan 24 15:05:40 2013 +0000 @@ -578,6 +578,21 @@ paint->restore(); } + QStringList tags = m_changeset->tags(); + if (!tags.empty()) { + QStringList nonTipTags; + foreach (QString t, tags) { + if (t != "tip") nonTipTags.push_back(t); + } + if (!nonTipTags.empty()) { + QString tagText = nonTipTags.join(" ").trimmed(); + int tw = fm.width(tagText); + paint->fillRect(QRectF(x0 + size/2 + 2, 0, tw + 4, fh - 1), + QBrush(Qt::yellow)); + paint->drawText(x0 + size/2 + 4, fm.ascent() - 1, tagText); + } + } + if (m_current && showProperLines) { paint->setRenderHint(QPainter::SmoothPixmapTransform, true); int starSize = fh * 1.5;