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:
parent
402cfc7d26
commit
7b5c62982d
@ -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));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ public:
|
||||
protected:
|
||||
virtual void showEvent( QShowEvent* );
|
||||
|
||||
void resizeEvent(QResizeEvent */*event*/);
|
||||
void paintEvent(QPaintEvent */*event*/);
|
||||
|
||||
private Q_SLOTS:
|
||||
void slotResetTimer();
|
||||
|
Loading…
Reference in New Issue
Block a user