From baf9fe603c2fa82261d92ed0ec7c446e3c7d0c82 Mon Sep 17 00:00:00 2001 From: keshavbhatt Date: Tue, 6 Apr 2021 03:58:16 +0530 Subject: lock UI fade in on init --- src/lock.cpp | 15 + src/lock.ui | 1074 +++++++++++++++++++++++++++++----------------------------- 2 files changed, 561 insertions(+), 528 deletions(-) (limited to 'src') 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 #else #include // sudo apt install libx11-dev + +#include +#include #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(){ diff --git a/src/lock.ui b/src/lock.ui index 21ac705..9279545 100644 --- a/src/lock.ui +++ b/src/lock.ui @@ -33,601 +33,619 @@ 0 - - - QWidget#signup { - background-image:url(:/icons/texture.png) -} - - - - 20 + + + + 0 + + + 0 + + + 0 + + + 0 - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - 0 - - - 0 - - - 0 + + + QWidget#signup { + background-image:url(:/icons/texture.png) +} - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - 10 + + + 20 + + + + + Qt::Vertical - - QLayout::SetMinimumSize + + + 20 + 40 + + + + + - 20 - - - 20 + 0 - 20 + 0 - 20 + 0 - - - 0 + + + Qt::Horizontal - - 5 + + + 40 + 20 + - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 128 - 128 - - - - background-color:transparent; - - - - - - :/icons/app/icon-128.png - - - Qt::AlignCenter - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + - - - - 14 - - - - Set application lock passcode - - - Qt::AlignCenter - - - true - + + + + + + + 10 + + + QLayout::SetMinimumSize + + + 20 + + + 20 + + + 20 + + + 20 + + + + + 0 + + + 5 + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 128 + 128 + + + + background-color:transparent; + + + + + + :/icons/app/icon-128.png + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + 14 + + + + Set application lock passcode + + + Qt::AlignCenter + + + true + + + + + + + + 0 + 30 + + + + QLineEdit::Password + + + Qt::AlignCenter + + + enter passcode + + + + + + + + 0 + 30 + + + + QLineEdit::Password + + + Qt::AlignCenter + + + enter passcode again + + + + + + + + 0 + 30 + + + + Set Pass Code + + + + + + + + 0 + 30 + + + + Cancel + + + + + + + Warning: Caps Lock is On + + + Qt::AlignCenter + + + + - - + + + Qt::Horizontal + + - 0 - 30 + 40 + 20 - - QLineEdit::Password - - - Qt::AlignCenter - - - enter passcode - - + + + + + + + 0 + - - + + + Qt::Horizontal + + - 0 - 30 + 40 + 20 - - QLineEdit::Password + + + + + + <html><head/><body><p>Note: Passcode must be more then 4 characters and must match in both fields.</p></body></html> Qt::AlignCenter - - enter passcode again + + false - - - - 0 - 30 - + + + Qt::Horizontal - - Set Pass Code - - - - - - + - 0 - 30 + 40 + 20 - - Cancel - - - - - - - Warning: Caps Lock is On - - - Qt::AlignCenter - - + - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - 0 - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - <html><head/><body><p>Note: Passcode must be more then 4 characters and must match in both fields.</p></body></html> - - - Qt::AlignCenter - - - false - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - QWidget#login { + + + QWidget#login { background-image:url(":/icons/texture.png") } - - - - 20 - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - 0 - - - 0 - - - 0 - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - 10 + + + 20 + + + + + Qt::Vertical - - 20 + + + 20 + 40 + - - 20 + + + + + + 0 - 20 + 0 - 20 + 0 - - - 0 + + + Qt::Horizontal - - 0 - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 128 - 128 - - - - background-color:transparent; - - - - - - :/icons/app/icon-128.png - - - Qt::AlignCenter - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - 0 - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 32 - 32 - - - - - 32 - 32 - - - - background-color:transparent; - - - - - - :/icons/lock-2-fill.png - - - true - - - Qt::AlignCenter - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - 14 - - - - Enter your passcode to get access to app - - - Qt::AlignCenter - - - true - - - - - - + - 0 - 30 + 40 + 20 - - QLineEdit::Password - - - Qt::AlignCenter - - - enter your passcode - - - - - - - - 0 - 30 - - - - Unlock - - + - - - Warning: Caps Lock is On - - - Qt::AlignCenter - + + + + + + + 10 + + + 20 + + + 20 + + + 20 + + + 20 + + + + + 0 + + + 0 + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 128 + 128 + + + + background-color:transparent; + + + + + + :/icons/app/icon-128.png + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + 0 + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 32 + 32 + + + + + 32 + 32 + + + + background-color:transparent; + + + + + + :/icons/lock-2-fill.png + + + true + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + 14 + + + + Enter your passcode to get access to app + + + Qt::AlignCenter + + + true + + + + + + + + 0 + 30 + + + + QLineEdit::Password + + + Qt::AlignCenter + + + enter your passcode + + + + + + + + 0 + 30 + + + + Unlock + + + + + + + Warning: Caps Lock is On + + + Qt::AlignCenter + + + + + + + <html><head/><body><p>Wrong Passcode, Please try again.</p></body></html> + + + Qt::AlignCenter + + + true + + + + - - - <html><head/><body><p>Wrong Passcode, Please try again.</p></body></html> - - - Qt::AlignCenter + + + Qt::Horizontal - - true + + + 40 + 20 + - + - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + -- cgit v1.2.3