From fa7b7824622715442ebf47757e2c4c82196723ab Mon Sep 17 00:00:00 2001 From: Andreas Demmer Date: Tue, 1 Jun 2010 18:23:14 +0000 Subject: [PATCH] added blurred background and dropshadow for ChangeDesktopOSD svn path=/trunk/KDE/kdebase/workspace/; revision=1133436 --- desktopchangeosd.cpp | 13 ++++++++++++- desktopchangeosd.h | 2 ++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/desktopchangeosd.cpp b/desktopchangeosd.cpp index 54b45b66f2..77c60ed022 100644 --- a/desktopchangeosd.cpp +++ b/desktopchangeosd.cpp @@ -300,7 +300,18 @@ void DesktopChangeOSD::resize() setGeometry( rect ); m_scene->setSceneRect( 0, 0, width, height ); m_frame.resizeFrame( QSize( width, height ) ); - setMask( m_frame.mask() ); + + if (Plasma::Theme::defaultTheme()->windowTranslucencyEnabled()) + { + // blur background + Plasma::WindowEffects::enableBlurBehind(winId(), true, m_frame.mask()); + Plasma::WindowEffects::overrideShadow(winId(), true); + } + else + { + // do not trim to mask with compositing enabled, otherwise shadows are cropped + setMask( m_frame.mask() ); + } // resize item frame m_item_frame.setElementPrefix( "normal" ); diff --git a/desktopchangeosd.h b/desktopchangeosd.h index 16c97c557b..6d8885c6b6 100644 --- a/desktopchangeosd.h +++ b/desktopchangeosd.h @@ -25,6 +25,8 @@ along with this program. If not, see . #include #include #include +#include +#include #include class QGraphicsScene;