commit ryan's black border on tooltip patch so i can merge to the branch soon

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=758187
This commit is contained in:
Aaron J. Seigo 2008-01-07 04:41:30 +00:00
parent 402cfc7d26
commit 7b5c62982d
2 changed files with 15 additions and 9 deletions

View File

@ -252,20 +252,26 @@ void WindowPreview::setInfo()
reinterpret_cast< unsigned char* >( data ), sizeof( data ) / sizeof( data[ 0 ] ));
}
//Patterned after KickerTip
//TODO: Do something to antialias edges
//Reimplement paintEvent perhaps?
void ToolTip::resizeEvent(QResizeEvent *)
void ToolTip::paintEvent(QPaintEvent *)
{
QPainter painter(this);
painter.setRenderHint(QPainter::Antialiasing);
// draw items
QBitmap mask(width(), height());
QPainter painter(&mask);
QPainter maskPainter(&mask);
mask.fill(Qt::white);
painter.setBrush(Qt::black);
painter.setPen(Qt::black);
painter.drawPath(Plasma::roundedRectangle(mask.rect(), 10));
maskPainter.setBrush(Qt::black);
maskPainter.setPen(Qt::black);
maskPainter.drawPath(roundedRectangle(mask.rect(), 10));
setMask(mask);
painter.setPen(Qt::black);
painter.drawPath(roundedRectangle(mask.rect(), 10));
}
}

View File

@ -52,7 +52,7 @@ public:
protected:
virtual void showEvent( QShowEvent* );
void resizeEvent(QResizeEvent */*event*/);
void paintEvent(QPaintEvent */*event*/);
private Q_SLOTS:
void slotResetTimer();