┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views
diff options
context:
space:
mode:
authorMark Gaiser <[email protected]>2012-05-26 18:05:25 +0200
committerMark Gaiser <[email protected]>2012-05-26 18:05:25 +0200
commita5c25d2de5c05f2aa30c02493b7f7f35942d3d03 (patch)
tree293e5c57e5dccb3557deef411cf2564762fe75d4 /src/views
parent23ab6051577189897da9072d172ba35e911e62a4 (diff)
Make tooltip background blurred.
REVIEW: 105061
Diffstat (limited to 'src/views')
-rw-r--r--src/views/tooltips/filemetadatatooltip.cpp10
-rw-r--r--src/views/tooltips/filemetadatatooltip.h2
2 files changed, 12 insertions, 0 deletions
diff --git a/src/views/tooltips/filemetadatatooltip.cpp b/src/views/tooltips/filemetadatatooltip.cpp
index 840c216a1..1f4fb69ae 100644
--- a/src/views/tooltips/filemetadatatooltip.cpp
+++ b/src/views/tooltips/filemetadatatooltip.cpp
@@ -1,6 +1,7 @@
/***************************************************************************
* Copyright (C) 2010 by Peter Penz <[email protected]> *
* Copyright (C) 2008 by Fredrik Höglund <[email protected]> *
+ * Copyright (C) 2012 by Mark Gaiser <[email protected]> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@@ -30,6 +31,9 @@
#include <QStylePainter>
#include <QVBoxLayout>
+// For the blurred tooltip background
+#include <plasma/windoweffects.h>
+
FileMetaDataToolTip::FileMetaDataToolTip(QWidget* parent) :
QWidget(parent),
m_preview(0),
@@ -123,4 +127,10 @@ void FileMetaDataToolTip::paintEvent(QPaintEvent* event)
QWidget::paintEvent(event);
}
+void FileMetaDataToolTip::showEvent(QShowEvent *)
+{
+ Plasma::WindowEffects::overrideShadow(winId(), true);
+ Plasma::WindowEffects::enableBlurBehind(winId(), true, mask());
+}
+
#include "filemetadatatooltip.moc"
diff --git a/src/views/tooltips/filemetadatatooltip.h b/src/views/tooltips/filemetadatatooltip.h
index 0f614d7d0..856b55746 100644
--- a/src/views/tooltips/filemetadatatooltip.h
+++ b/src/views/tooltips/filemetadatatooltip.h
@@ -1,6 +1,7 @@
/***************************************************************************
* Copyright (C) 2010 by Peter Penz <[email protected]> *
* Copyright (C) 2008 by Fredrik Höglund <[email protected]> *
+ * Copyright (C) 2012 by Mark Gaiser <[email protected]> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@@ -62,6 +63,7 @@ signals:
protected:
virtual void paintEvent(QPaintEvent* event);
+ virtual void showEvent(QShowEvent *);
private:
QLabel* m_preview;