From 47c761a5f0d9c8b39ddb189d3152907f8da6d5a4 Mon Sep 17 00:00:00 2001 From: Mavridis Philippe Date: Thu, 1 Apr 2021 19:37:31 +0300 Subject: Added implementation of background blur feature. Signed-off-by: Mavridis Philippe --- src/komposedesktopwidget.cpp | 7 +++++++ src/komposefullscreenwidget.cpp | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/src/komposedesktopwidget.cpp b/src/komposedesktopwidget.cpp index cbf100a..1760069 100644 --- a/src/komposedesktopwidget.cpp +++ b/src/komposedesktopwidget.cpp @@ -61,6 +61,13 @@ KomposeDesktopWidget::KomposeDesktopWidget(int desktop, TQWidget *parent, Kompos TQToolTip::add( this, i18n("Desktop %1 - %2").arg(desktop).arg(deskName) ); rootpix = new KRootPixmap (this); + + // Background blur -- exactly as done in Kicker + if(KomposeSettings::instance()->getBlurBackground()) + rootpix->setBlurEffect(0.0, 4.0); + else + rootpix->setBlurEffect(0.0, 0.0); + rootpix->start(); setAcceptDrops(TRUE); diff --git a/src/komposefullscreenwidget.cpp b/src/komposefullscreenwidget.cpp index 4e656c2..4c452b9 100644 --- a/src/komposefullscreenwidget.cpp +++ b/src/komposefullscreenwidget.cpp @@ -48,6 +48,13 @@ KomposeFullscreenWidget::KomposeFullscreenWidget( int displayType, KomposeLayout setBackgroundMode( TQt::FixedPixmap ); // setBackgroundPixmap(*(KomposeGlobal::instance()->getDesktopBgPixmap())); rootpix = new KRootPixmap (this); + + // Background blur -- exactly like done in Kicker + if (KomposeSettings::instance()->getBlurBackground()) + rootpix->setBlurEffect(0.0, 4.0); + else + rootpix->setBlurEffect(0.0, 0.0); + rootpix->start(); initMenu(); initView(); -- cgit v1.2.1