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 "tooltip_p.h"
|
||||||
|
|
||||||
|
#include <QBitmap>
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
@ -32,6 +33,8 @@
|
|||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <fixx11h.h>
|
#include <fixx11h.h>
|
||||||
|
|
||||||
|
#include "plasma/plasma.h"
|
||||||
|
|
||||||
namespace Plasma {
|
namespace Plasma {
|
||||||
|
|
||||||
class ToolTip::Private
|
class ToolTip::Private
|
||||||
@ -249,5 +252,21 @@ 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
|
||||||
|
//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"
|
#include "tooltip_p.moc"
|
||||||
|
@ -52,6 +52,8 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
virtual void showEvent( QShowEvent* );
|
virtual void showEvent( QShowEvent* );
|
||||||
|
|
||||||
|
void resizeEvent(QResizeEvent */*event*/);
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void slotResetTimer();
|
void slotResetTimer();
|
||||||
void slotShowToolTip();
|
void slotShowToolTip();
|
||||||
|
Loading…
Reference in New Issue
Block a user