diff options
author | Ken Moore <ken@ixsystems.com> | 2017-10-11 12:14:26 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-10-11 12:14:26 -0400 |
commit | a2bb82ae14f9f52c15e08880a559781d6f9e9ecb (patch) | |
tree | 782ace1f5a2281bcc69ff928a15e6bc11883e87e | |
parent | Get the Lumina2 screensaver system converted over to the new QML-backed plugi... (diff) | |
download | lumina-a2bb82ae14f9f52c15e08880a559781d6f9e9ecb.tar.gz lumina-a2bb82ae14f9f52c15e08880a559781d6f9e9ecb.tar.bz2 lumina-a2bb82ae14f9f52c15e08880a559781d6f9e9ecb.zip |
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.
3 files changed, 5 insertions, 11 deletions
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 <LScreenSaver.h>) as needed without paths -INCLUDEPATH *= ${PWD} +INCLUDEPATH *= $${PWD} #Now include all the screensaver animations/options -include(animations/animations.pri) +#include(animations/animations.pri) |