diff options
author | 2021-04-05 11:13:06 +0530 | |
---|---|---|
committer | 2021-04-05 11:13:06 +0530 | |
commit | 247580131f26881b6d47966ba97f4a53ebe73583 (patch) | |
tree | 1b80bb3ab2f921332ea58570f042ba9b142b71f8 /src/mainwindow.cpp | |
parent | d3bb4e39c23886bf0555ba9019a48d9357c9003d (diff) | |
download | whatsie-247580131f26881b6d47966ba97f4a53ebe73583.tar.gz whatsie-247580131f26881b6d47966ba97f4a53ebe73583.zip |
lock screen init
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index d27ae79..e30f393 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -301,6 +301,42 @@ void MainWindow::createTrayIcon() this, &MainWindow::iconActivated); } + +void MainWindow::init_lock() +{ +// if(lockWidget==nullptr){ +// lockWidget = new Lock(this); +// lockWidget->setObjectName("lockWidget"); +// } +// lockWidget->setWindowFlags(Qt::Widget); +// lockWidget->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); +// lockWidget->setGeometry(this->rect()); + +// connect(lockWidget,&Lock::passwordNotSet,[=](){ +// settings.setValue("lockscreen",false); +// ui->applock_checkbox->setChecked(false); +// }); + +// connect(lockWidget,&Lock::unLocked,[=]() +// { +// //unlock event +// }); + +// connect(lockWidget,&Lock::passwordSet,[=](){ +// //enable disable lock screen +// if(settings.value("asdfg").isValid()){ +// ui->current_password->setText("Current Password: <i>"+QByteArray::fromBase64(settings.value("asdfg").toString().toUtf8())+"</i>"); +// }else{ +// ui->current_password->setText("Current Password: <i>Require setup</i>"); +// } +// ui->applock_checkbox->setChecked(settings.value("lockscreen",false).toBool()); +// }); +// lockWidget->show(); +// if(settings.value("asdfg").isValid() && settings.value("lockscreen").toBool()==true){ +// lockWidget->lock_app(); +// } +} + //check window state and set tray menus void MainWindow::check_window_state() { @@ -428,7 +464,7 @@ void MainWindow::createWebPage(bool offTheRecord) QWebEnginePage *page = new WebEnginePage(profile,webEngine); if(settings.value("windowTheme","light").toString() == "dark"){ - page->setBackgroundColor(QColor("#F0F0F0")); //whatsapp bg color + page->setBackgroundColor(QColor("#131C21")); //whatsapp bg color } webEngine->setPage(page); //page should be set parent of profile to prevent |