comparison src/changesetitem.cpp @ 520:a17c06f773cd

idiot -- we don't need to query bookmarks separately, we can just add them to the log template
author Chris Cannam
date Wed, 09 Nov 2011 13:04:00 +0000
parents 000f13faa089
children b5a342a71218
comparison
equal deleted inserted replaced
519:000f13faa089 520:a17c06f773cd
405 QBrush(Qt::yellow)); 405 QBrush(Qt::yellow));
406 paint->drawText(x0 + width - 6 - tw, fm.ascent(), tagText); 406 paint->drawText(x0 + width - 6 - tw, fm.ascent(), tagText);
407 } 407 }
408 } 408 }
409 409
410 if (!m_bookmarks.empty()) {
411 QString bmText = m_bookmarks.join(" ").trimmed();
412 int bw = fm.width(bmText);
413 paint->fillRect(QRectF(x0 + width - 8 - bw, 1, bw + 4, fh - 1),
414 QBrush(Qt::yellow)); paint->drawText(x0 + width - 6 - bw, fm.ascent(), bmText);
415 }
416
417 paint->setPen(QPen(branchColour, 2));
418 paint->setBrush(Qt::NoBrush);
419 paint->drawRoundedRect(r, 7, 7);
420
421 if (m_showBranch) { 410 if (m_showBranch) {
422 // write branch name 411 // write branch name
423 paint->save(); 412 paint->save();
424 f.setBold(true); 413 f.setBold(true);
425 paint->setFont(f); 414 paint->setFont(f);
430 branch = TextAbbrev::abbreviate(branch, QFontMetrics(f), wid); 419 branch = TextAbbrev::abbreviate(branch, QFontMetrics(f), wid);
431 paint->drawText(x0, -fh + fm.ascent() - 4, branch); 420 paint->drawText(x0, -fh + fm.ascent() - 4, branch);
432 f.setBold(false); 421 f.setBold(false);
433 paint->restore(); 422 paint->restore();
434 } 423 }
424
425 QStringList bookmarks = m_changeset->bookmarks();
426 if (!bookmarks.empty()) {
427 QString bmText = bookmarks.join(" ").trimmed();
428 int bw = fm.width(bmText);
429 paint->fillRect(QRectF(x0 + width - fh*2 - bw, -fh - 4,
430 bw + 4, fh - 1),
431 QBrush(Qt::yellow));
432 paint->drawText(x0 + width - fh*2 - bw + 2,
433 -fh + fm.ascent() - 4, bmText);
434 }
435
436 paint->setPen(QPen(branchColour, 2));
437 paint->setBrush(Qt::NoBrush);
438 paint->drawRoundedRect(r, 7, 7);
435 439
436 if (m_current && showProperLines) { 440 if (m_current && showProperLines) {
437 paint->setRenderHint(QPainter::SmoothPixmapTransform, true); 441 paint->setRenderHint(QPainter::SmoothPixmapTransform, true);
438 int starSize = fh * 1.5; 442 int starSize = fh * 1.5;
439 paint->drawImage(QRectF(x0 + width - starSize, 443 paint->drawImage(QRectF(x0 + width - starSize,