comparison src/changesetitem.cpp @ 386:7ef46fb73b48 item_appearance_adjustments

Use rounded rectangles throughout
author Chris Cannam
date Tue, 24 May 2011 14:05:35 +0100
parents b9c153e00e84
children ce6a70970808
comparison
equal deleted inserted replaced
385:5cc0d897eb26 386:7ef46fb73b48
304 if (showProperLines) { 304 if (showProperLines) {
305 305
306 paint->setBrush(Qt::white); 306 paint->setBrush(Qt::white);
307 307
308 if (m_current) { 308 if (m_current) {
309 paint->drawRect(QRectF(x0 - 4, -4, width + 5, height + 8)); 309 paint->drawRoundedRect(QRectF(x0 - 4, -4, width + 5, height + 8),
310 10, 10);
310 } 311 }
311 312
312 if (m_new) { 313 if (m_new) {
313 paint->save(); 314 paint->save();
314 paint->setPen(Qt::yellow); 315 paint->setPen(Qt::yellow);
315 paint->setBrush(Qt::NoBrush); 316 paint->setBrush(Qt::NoBrush);
316 paint->drawRect(QRectF(x0 - 2, -2, width + 1, height + 4)); 317 paint->drawRoundedRect(QRectF(x0 - 2, -2, width + 1, height + 4),
318 10, 10);
317 paint->restore(); 319 paint->restore();
318 } 320 }
319 } 321 }
320 322
321 paint->drawRect(r);
322
323 if (!showText) { 323 if (!showText) {
324 paint->drawRoundedRect(r, 7, 7);
324 paint->restore(); 325 paint->restore();
325 return; 326 return;
326 } 327 }
327 328
328 paint->fillRect(QRectF(x0 + 0.5, 0.5, width - 4, fh - 0.5), 329 paint->save();
329 QBrush(userColour)); 330 paint->setPen(Qt::NoPen);
331 paint->drawRoundedRect(r, 7, 7);
332 paint->setBrush(QBrush(userColour));
333 paint->drawRoundedRect(QRectF(x0 + 0.5, 0.5, width - 4, fh - 0.5), 7, 7);
334 paint->drawRect(QRectF(x0 + 0.5, fh/2, width - 4, fh/2));
335 paint->restore();
330 336
331 paint->setPen(QPen(Qt::white)); 337 paint->setPen(QPen(Qt::white));
332 338
333 QString person = TextAbbrev::abbreviate(m_changeset->authorName(), 339 QString person = TextAbbrev::abbreviate(m_changeset->authorName(),
334 fm, textwid); 340 fm, textwid);
355 paint->fillRect(QRectF(x0 + width - 8 - tw, 1, tw + 4, fh - 1), 361 paint->fillRect(QRectF(x0 + width - 8 - tw, 1, tw + 4, fh - 1),
356 QBrush(Qt::yellow)); 362 QBrush(Qt::yellow));
357 paint->drawText(x0 + width - 6 - tw, fm.ascent(), tagText); 363 paint->drawText(x0 + width - 6 - tw, fm.ascent(), tagText);
358 } 364 }
359 } 365 }
366
367 paint->setPen(QPen(branchColour, 2));
368 paint->setBrush(Qt::NoBrush);
369 paint->drawRoundedRect(r, 7, 7);
360 370
361 if (m_showBranch) { 371 if (m_showBranch) {
362 // write branch name 372 // write branch name
363 paint->save(); 373 paint->save();
364 f.setBold(true); 374 f.setBold(true);