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:
Joseph Donofry 2021-01-26 17:23:28 -05:00
parent cb93ac3402
commit bfeb766a91
No known key found for this signature in database
GPG key ID: E8A1D78EF044B0CB
8 changed files with 137 additions and 35 deletions

View file

@ -836,13 +836,15 @@ UserSettingsPage::UserSettingsPage(QSharedPointer<UserSettings> settings, QWidge
decryptSidebar_,
tr("Decrypt the messages shown in the sidebar.\nOnly affects messages in "
"encrypted chats."));
boxWrap(tr("Encrypted chat privacy screen"),
boxWrap(tr("Privacy Screen"),
privacyScreen_,
tr("When the window loses focus, the timeline will\nbe blurred."));
boxWrap(tr("Privacy screen timeout"),
privacyScreenTimeout_,
tr("Set timeout for how long after window loses\nfocus before the screen"
" will be blurred.\nSet to 0 to blur immediately after focus loss."));
boxWrap(
tr("Privacy screen timeout"),
privacyScreenTimeout_,
tr("Set timeout (in seconds) for how long after window loses\nfocus before the screen"
" will be blurred.\nSet to 0 to blur immediately after focus loss. Max value of 1 "
"hour (3600 seconds)"));
boxWrap(tr("Show buttons in timeline"),
timelineButtonsToggle_,
tr("Show buttons to quickly reply, react or access additional options next to each "