aboutsummaryrefslogtreecommitdiff
path: root/src/lock.cpp
diff options
context:
space:
mode:
authorLibravatar keshavbhatt <keshavnrj@gmail.com>2021-04-06 03:58:16 +0530
committerLibravatar keshavbhatt <keshavnrj@gmail.com>2021-04-06 03:58:16 +0530
commitbaf9fe603c2fa82261d92ed0ec7c446e3c7d0c82 (patch)
tree9da27d4059a91b857a80d3442bd574a4b119ba20 /src/lock.cpp
parent9ce99fb8882a6130123db5d660c5fa60e33f615a (diff)
downloadwhatsie-baf9fe603c2fa82261d92ed0ec7c446e3c7d0c82.tar.gz
whatsie-baf9fe603c2fa82261d92ed0ec7c446e3c7d0c82.zip
lock UI fade in on init
Diffstat (limited to 'src/lock.cpp')
-rw-r--r--src/lock.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/lock.cpp b/src/lock.cpp
index c8d682c..a94a53e 100644
--- a/src/lock.cpp
+++ b/src/lock.cpp
@@ -6,6 +6,9 @@
#include <Windows.h>
#else
#include <X11/XKBlib.h> // sudo apt install libx11-dev
+
+#include <QGraphicsOpacityEffect>
+#include <QPropertyAnimation>
#endif
Lock::Lock(QWidget *parent) :
@@ -17,6 +20,17 @@ Lock::Lock(QWidget *parent) :
ui->setPass->setEnabled(false);
ui->wrong->hide();
+ ui->centerWidget->hide();
+ QGraphicsOpacityEffect *eff = new QGraphicsOpacityEffect(this);
+ ui->centerWidget->setGraphicsEffect(eff);
+ QPropertyAnimation *a = new QPropertyAnimation(eff,"opacity");
+ a->setDuration(400);
+ a->setStartValue(0);
+ a->setEndValue(1);
+ a->setEasingCurve(QEasingCurve::InCurve);
+ a->start(QPropertyAnimation::DeleteWhenStopped);
+ ui->centerWidget->show();
+
if(settings.value("asdfg").isValid() == false)
{
isLocked = false;
@@ -38,6 +52,7 @@ Lock::Lock(QWidget *parent) :
ui->caps2->setStyleSheet(capsStyle);
ui->signup_warning->setStyleSheet(capsStyle);
ui->wrong->setStyleSheet(capsStyle);
+
}
void Lock::applyThemeQuirks(){