chatviewsearchcontroller.diff
| home/sphilips/projects/quassel/src/qtui/chatviewsearchcontroller.cpp 2008-08-31 16:04:27.000000000 +0000 | ||
|---|---|---|
| 192 | 192 |
updateHighlights(searchOnlyRegularMsgs); |
| 193 | 193 |
} |
| 194 | 194 | |
| 195 |
#define HIGHLIGHT_PADDING 3 |
|
| 195 | 196 |
SearchHighlightItem::SearchHighlightItem(QRectF wordRect, QGraphicsItem *parent) |
| 196 | 197 |
: QGraphicsItem(parent), |
| 197 |
_boundingRect(QRectF(-wordRect.width() / 2, -wordRect.height() / 2, wordRect.width(), wordRect.height()))
|
|
| 198 |
_boundingRect(QRectF(-wordRect.width() / 2, -wordRect.height() / 2, wordRect.width() + HIGHLIGHT_PADDING*2, wordRect.height() + HIGHLIGHT_PADDING*2))
|
|
| 198 | 199 |
{
|
| 199 |
setPos(wordRect.x() + wordRect.width() / 2 , wordRect.y() + wordRect.height() / 2); |
|
| 200 |
scale(1.2, 1.2); |
|
| 200 |
setPos(wordRect.x() + wordRect.width() / 2 - HIGHLIGHT_PADDING, wordRect.y() + wordRect.height() / 2 - HIGHLIGHT_PADDING); |
|
| 201 | 201 |
} |
| 202 | 202 | |
| 203 | 203 |
void SearchHighlightItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) {
|