include a slight mod of ryan's curved corner patch; committing directly to ensure we make the deadline
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=756856
This commit is contained in:
parent
f6252b9573
commit
dc4981ec41
@ -19,6 +19,7 @@
|
||||
*/
|
||||
#include "tooltip_p.h"
|
||||
|
||||
#include <QBitmap>
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QPixmap>
|
||||
@ -32,6 +33,8 @@
|
||||
#include <X11/Xlib.h>
|
||||
#include <fixx11h.h>
|
||||
|
||||
#include "plasma/plasma.h"
|
||||
|
||||
namespace Plasma {
|
||||
|
||||
class ToolTip::Private
|
||||
@ -249,5 +252,21 @@ 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 *)
|
||||
{
|
||||
QBitmap mask(width(), height());
|
||||
QPainter painter(&mask);
|
||||
|
||||
mask.fill(Qt::white);
|
||||
|
||||
painter.setBrush(Qt::black);
|
||||
painter.setPen(Qt::black);
|
||||
painter.drawPath(Plasma::roundedRectangle(mask.rect(), 10));
|
||||
setMask(mask);
|
||||
}
|
||||
|
||||
}
|
||||
#include "tooltip_p.moc"
|
||||
|
@ -52,6 +52,8 @@ public:
|
||||
protected:
|
||||
virtual void showEvent( QShowEvent* );
|
||||
|
||||
void resizeEvent(QResizeEvent */*event*/);
|
||||
|
||||
private Q_SLOTS:
|
||||
void slotResetTimer();
|
||||
void slotShowToolTip();
|
||||
|
Loading…
Reference in New Issue
Block a user