Blur behind for tooltips
Also clean up flags a bit.
This commit is contained in:
parent
010f471bc7
commit
d207025d8f
@ -25,6 +25,9 @@
|
|||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
|
#include "framesvgitem.h"
|
||||||
|
#include <kwindoweffects.h>
|
||||||
|
|
||||||
ToolTipWindow::ToolTipWindow(QWindow *parent)
|
ToolTipWindow::ToolTipWindow(QWindow *parent)
|
||||||
: QQuickWindow(parent), m_mainText(""), m_subText(""), m_widget(0)
|
: QQuickWindow(parent), m_mainText(""), m_subText(""), m_widget(0)
|
||||||
{
|
{
|
||||||
@ -33,12 +36,7 @@ ToolTipWindow::ToolTipWindow(QWindow *parent)
|
|||||||
setFormat(format);
|
setFormat(format);
|
||||||
setClearBeforeRendering(true);
|
setClearBeforeRendering(true);
|
||||||
setColor(QColor(Qt::transparent));
|
setColor(QColor(Qt::transparent));
|
||||||
setFlags(Qt::FramelessWindowHint | Qt::X11BypassWindowManagerHint | Qt::ToolTip);
|
setFlags(Qt::ToolTip);
|
||||||
//setAttribute
|
|
||||||
//setAttribute(Qt::WA_X11NetWmWindowTypeToolTip, true)
|
|
||||||
// tooltipDialog.windowFlags = Qt.Window|Qt.WindowStaysOnTopHint|Qt.X11BypassWindowManagerHint
|
|
||||||
|
|
||||||
//m_flags = flags();
|
|
||||||
|
|
||||||
m_syncTimer = new QTimer(this);
|
m_syncTimer = new QTimer(this);
|
||||||
m_syncTimer->setSingleShot(true);
|
m_syncTimer->setSingleShot(true);
|
||||||
@ -82,6 +80,11 @@ void ToolTipWindow::syncGeometry()
|
|||||||
qDebug() << "XXXX mainitem : " << mainItem()->width() << mainItem()->height();
|
qDebug() << "XXXX mainitem : " << mainItem()->width() << mainItem()->height();
|
||||||
resize(mainItem()->width(), mainItem()->height());
|
resize(mainItem()->width(), mainItem()->height());
|
||||||
setPosition(popupPosition(visualParent()));
|
setPosition(popupPosition(visualParent()));
|
||||||
|
|
||||||
|
Plasma::FrameSvgItem *frameSvg = qobject_cast<Plasma::FrameSvgItem*>(mainItem());
|
||||||
|
if (frameSvg) {
|
||||||
|
KWindowEffects::enableBlurBehind(winId(), true, frameSvg->frameSvg()->mask());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString ToolTipWindow::mainText() const
|
QString ToolTipWindow::mainText() const
|
||||||
|
Loading…
Reference in New Issue
Block a user