Implement Privacy Screen
* Add handles for window focus gained / focus lossed and connect to timer * Clean up some of the PrivacyScreen.qml code * Connect settings to PrivacyScreen visibility
This commit is contained in:
parent
cb93ac3402
commit
bfeb766a91
8 changed files with 137 additions and 35 deletions
|
|
@ -130,6 +130,9 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
SLOT(iconActivated(QSystemTrayIcon::ActivationReason)));
|
||||
|
||||
connect(chat_page_, SIGNAL(contentLoaded()), this, SLOT(removeOverlayProgressBar()));
|
||||
|
||||
connect(this, &MainWindow::focusChanged, chat_page_, &ChatPage::chatFocusChanged);
|
||||
|
||||
connect(
|
||||
chat_page_, &ChatPage::showUserSettingsPage, this, &MainWindow::showUserSettingsPage);
|
||||
|
||||
|
|
@ -204,6 +207,19 @@ MainWindow::resizeEvent(QResizeEvent *event)
|
|||
QMainWindow::resizeEvent(event);
|
||||
}
|
||||
|
||||
bool
|
||||
MainWindow::event(QEvent *event)
|
||||
{
|
||||
auto type = event->type();
|
||||
if (type == QEvent::WindowActivate) {
|
||||
emit focusChanged(true);
|
||||
} else if (type == QEvent::WindowDeactivate) {
|
||||
emit focusChanged(false);
|
||||
}
|
||||
|
||||
return QMainWindow::event(event);
|
||||
}
|
||||
|
||||
void
|
||||
MainWindow::adjustSideBars()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue