From a2bb82ae14f9f52c15e08880a559781d6f9e9ecb Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 11 Oct 2017 12:14:26 -0400 Subject: A bit more cleanup for the screensaver system. Now the old animations are completely ignored in the build, and the mouse cursor is hidden while the screensaver is active. --- .../core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp | 6 +++--- src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.h | 6 ------ src-qt5/core/lumina-desktop-unified/src-screensaver/screensaver.pri | 4 ++-- 3 files changed, 5 insertions(+), 11 deletions(-) (limited to 'src-qt5') diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp b/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp index 227e51ac..122307b3 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp @@ -16,10 +16,10 @@ SSBaseWidget::SSBaseWidget(QWidget *parent) : QQuickView(parent->windowHandle()) this->setObjectName("LuminaBaseSSWidget"); this->setResizeMode(QQuickView::SizeRootObjectToView); this->setColor(QColor("black")); //default color for the view - //this->setMouseTracking(true); + this->setCursor(Qt::BlankCursor); plugType="none"; restartTimer = new QTimer(this); - restartTimer->setInterval( DesktopSettings::instance()->value(DesktopSettings::ScreenSaver, "globals/plugin_time_seconds", 60).toInt() * 1000); + restartTimer->setInterval( DesktopSettings::instance()->value(DesktopSettings::ScreenSaver, "globals/plugin_time_seconds", 120).toInt() * 1000); restartTimer->setSingleShot(true); connect(restartTimer, SIGNAL(timeout()), this, SLOT(startPainting()) ); } @@ -47,7 +47,7 @@ void SSBaseWidget::startPainting(){ if(DEBUG){ qDebug() << " - Screen Saver:" << plugType << cplug.scriptURL() << cplug.isValid(); } if(cplug.isValid()){ this->setSource( cplug.scriptURL() ); - restartTimer->start(); + if(plugType=="random"){ restartTimer->start(); } } } diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.h b/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.h index fdb23e66..72e02702 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.h +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.h @@ -43,12 +43,6 @@ protected: ev->accept(); emit InputDetected(); } - /*void paintEvent(QPaintEvent*){ - QStyleOption opt; - opt.init(this); - QPainter p(this); - style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this); - }*/ }; diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/screensaver.pri b/src-qt5/core/lumina-desktop-unified/src-screensaver/screensaver.pri index f95891c1..92cc7bd2 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/screensaver.pri +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/screensaver.pri @@ -9,7 +9,7 @@ HEADERS *= $${PWD}/LLockScreen.h \ FORMS *= $${PWD}/LLockScreen.ui #update the includepath so we can just (#include ) as needed without paths -INCLUDEPATH *= ${PWD} +INCLUDEPATH *= $${PWD} #Now include all the screensaver animations/options -include(animations/animations.pri) +#include(animations/animations.pri) -- cgit