aboutsummaryrefslogtreecommitdiff
path: root/src/lock.cpp
diff options
context:
space:
mode:
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(){