comparison src/changesetitem.cpp @ 392:cf18694f64a3 item_appearance_adjustments

Draw star after (above) branch name
author Chris Cannam <chris.cannam@eecs.qmul.ac.uk>
date Tue, 24 May 2011 17:39:42 +0100
parents 1a811e7721f1
children 0c826f07929f
comparison
equal deleted inserted replaced
391:1a811e7721f1 392:cf18694f64a3
387 387
388 paint->setPen(QPen(branchColour, 2)); 388 paint->setPen(QPen(branchColour, 2));
389 paint->setBrush(Qt::NoBrush); 389 paint->setBrush(Qt::NoBrush);
390 paint->drawRoundedRect(r, 7, 7); 390 paint->drawRoundedRect(r, 7, 7);
391 391
392 if (m_current && showProperLines) {
393 paint->setRenderHint(QPainter::SmoothPixmapTransform, true);
394 int starSize = fh * 1.5;
395 paint->drawImage(QRectF(x0 + width - starSize,
396 -fh, starSize, starSize),
397 *m_star);
398 }
399
400 if (m_showBranch) { 392 if (m_showBranch) {
401 // write branch name 393 // write branch name
402 paint->save(); 394 paint->save();
403 f.setBold(true); 395 f.setBold(true);
404 paint->setFont(f); 396 paint->setFont(f);
410 paint->drawText(x0, -fh + fm.ascent() - 4, branch); 402 paint->drawText(x0, -fh + fm.ascent() - 4, branch);
411 f.setBold(false); 403 f.setBold(false);
412 paint->restore(); 404 paint->restore();
413 } 405 }
414 406
407 if (m_current && showProperLines) {
408 paint->setRenderHint(QPainter::SmoothPixmapTransform, true);
409 int starSize = fh * 1.5;
410 paint->drawImage(QRectF(x0 + width - starSize,
411 -fh, starSize, starSize),
412 *m_star);
413 }
414
415 paint->setFont(f); 415 paint->setFont(f);
416 416
417 for (int i = 0; i < lines.size(); ++i) { 417 for (int i = 0; i < lines.size(); ++i) {
418 paint->drawText(x0 + 3, i * fh + fh + fm.ascent(), lines[i].trimmed()); 418 paint->drawText(x0 + 3, i * fh + fh + fm.ascent(), lines[i].trimmed());
419 } 419 }