diff options
| author | Mark Gaiser <[email protected]> | 2012-05-26 18:05:25 +0200 |
|---|---|---|
| committer | Mark Gaiser <[email protected]> | 2012-05-26 18:05:25 +0200 |
| commit | a5c25d2de5c05f2aa30c02493b7f7f35942d3d03 (patch) | |
| tree | 293e5c57e5dccb3557deef411cf2564762fe75d4 | |
| parent | 23ab6051577189897da9072d172ba35e911e62a4 (diff) | |
Make tooltip background blurred.
REVIEW: 105061
| -rw-r--r-- | src/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/views/tooltips/filemetadatatooltip.cpp | 10 | ||||
| -rw-r--r-- | src/views/tooltips/filemetadatatooltip.h | 2 |
3 files changed, 14 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0373d0e78..97b7e305c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -121,6 +121,8 @@ if(X11_Xrender_FOUND) target_link_libraries(dolphinprivate ${X11_Xrender_LIB}) endif(X11_Xrender_FOUND) +target_link_libraries(dolphinprivate ${KDE4_PLASMA_LIBS}) + set_target_properties(dolphinprivate PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} ) install(TARGETS dolphinprivate ${INSTALL_TARGETS_DEFAULT_ARGS}) 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; |
