chatline.diff
home/sphilips/projects/quassel/src/qtui/chatline.cpp 2008-08-31 18:36:04.000000000 +0000 | ||
---|---|---|
113 | 113 |
void ChatLine::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { |
114 | 114 |
Q_UNUSED(option); |
115 | 115 |
Q_UNUSED(widget); |
116 | ||
117 |
// Some tweaks. They gain us a few ms, but every bit helps. |
|
118 |
painter->setPen(Qt::NoPen); // Apparently, using a Pen is slow when drawing text. |
|
119 |
painter->setClipRect(option->exposedRect); // Don't repaint things that don't have to be repainted. |
|
120 | ||
116 | 121 |
if(_selection & Highlighted) { |
117 | 122 |
painter->fillRect(boundingRect(), QBrush(QtUi::style()->highlightColor())); |
118 | 123 |
} |