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 ] ));
|
reinterpret_cast< unsigned char* >( data ), sizeof( data ) / sizeof( data[ 0 ] ));
|
||||||
}
|
}
|
||||||
|
|
||||||
//Patterned after KickerTip
|
|
||||||
//TODO: Do something to antialias edges
|
void ToolTip::paintEvent(QPaintEvent *)
|
||||||
//Reimplement paintEvent perhaps?
|
|
||||||
void ToolTip::resizeEvent(QResizeEvent *)
|
|
||||||
{
|
{
|
||||||
|
QPainter painter(this);
|
||||||
|
painter.setRenderHint(QPainter::Antialiasing);
|
||||||
|
|
||||||
|
// draw items
|
||||||
QBitmap mask(width(), height());
|
QBitmap mask(width(), height());
|
||||||
QPainter painter(&mask);
|
QPainter maskPainter(&mask);
|
||||||
|
|
||||||
mask.fill(Qt::white);
|
mask.fill(Qt::white);
|
||||||
|
|
||||||
painter.setBrush(Qt::black);
|
maskPainter.setBrush(Qt::black);
|
||||||
painter.setPen(Qt::black);
|
maskPainter.setPen(Qt::black);
|
||||||
painter.drawPath(Plasma::roundedRectangle(mask.rect(), 10));
|
|
||||||
|
maskPainter.drawPath(roundedRectangle(mask.rect(), 10));
|
||||||
setMask(mask);
|
setMask(mask);
|
||||||
|
|
||||||
|
painter.setPen(Qt::black);
|
||||||
|
painter.drawPath(roundedRectangle(mask.rect(), 10));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
virtual void showEvent( QShowEvent* );
|
virtual void showEvent( QShowEvent* );
|
||||||
|
|
||||||
void resizeEvent(QResizeEvent */*event*/);
|
void paintEvent(QPaintEvent */*event*/);
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void slotResetTimer();
|
void slotResetTimer();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user