aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-pingcursor
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2020-04-03 14:31:07 -0400
committerKen Moore <moorekou@gmail.com>2020-04-03 14:31:07 -0400
commit4ce2fd1c9484d5d912695e40f5403bed9c0c8328 (patch)
tree8f1394948b36a2525305652249e22799966abe27 /src-qt5/core/lumina-pingcursor
parentGet lumina-pingcursor integrated into the core package. (diff)
downloadlumina-4ce2fd1c9484d5d912695e40f5403bed9c0c8328.tar.gz
lumina-4ce2fd1c9484d5d912695e40f5403bed9c0c8328.tar.bz2
lumina-4ce2fd1c9484d5d912695e40f5403bed9c0c8328.zip
Limit lumina-pingcursor to 60 FPS
Diffstat (limited to 'src-qt5/core/lumina-pingcursor')
-rw-r--r--src-qt5/core/lumina-pingcursor/main.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src-qt5/core/lumina-pingcursor/main.cpp b/src-qt5/core/lumina-pingcursor/main.cpp
index 9dfecd94..6e332398 100644
--- a/src-qt5/core/lumina-pingcursor/main.cpp
+++ b/src-qt5/core/lumina-pingcursor/main.cpp
@@ -13,6 +13,7 @@
#include <QScreen>
#include <QDesktopWidget>
#include <QPropertyAnimation>
+#include <QThread>
int main(int argc, char **argv){
//Setup the application
@@ -31,13 +32,13 @@ int main(int argc, char **argv){
splash.setPixmap(QApplication::screens().at(0)->grabWindow(QApplication::desktop()->winId(), splash.x(), splash.y(), 100,100) );
splash.show();
QPropertyAnimation anim(&splash,"windowOpacity");
- anim.setDuration(1500);
+ anim.setDuration(1200);
anim.setStartValue(1);
anim.setKeyValueAt(0.30, 0); anim.setKeyValueAt(0.31, 1);
anim.setKeyValueAt(0.60, 0); anim.setKeyValueAt(0.61, 1);
anim.setEndValue(0);
anim.start();
- while(anim.state() != QAbstractAnimation::Stopped){ App.processEvents(); }
+ while(anim.state() != QAbstractAnimation::Stopped){ QThread::msleep(20); App.processEvents(); } //60 fps
splash.hide();
return 0;
}
bgstack15