mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Added setting to auto close user popup (#1833)
* Set autoclose as true by default to match stable version (2.1.7) behavior
This commit is contained in:
parent
db666c4946
commit
208f9b093c
3 changed files with 7 additions and 0 deletions
|
@ -126,6 +126,7 @@ public:
|
||||||
BoolSetting showParts = {"/behaviour/showParts", false};
|
BoolSetting showParts = {"/behaviour/showParts", false};
|
||||||
FloatSetting mouseScrollMultiplier = {"/behaviour/mouseScrollMultiplier",
|
FloatSetting mouseScrollMultiplier = {"/behaviour/mouseScrollMultiplier",
|
||||||
1.0};
|
1.0};
|
||||||
|
BoolSetting autoCloseUserPopup = {"/behaviour/autoCloseUserPopup", true};
|
||||||
// BoolSetting twitchSeperateWriteConnection =
|
// BoolSetting twitchSeperateWriteConnection =
|
||||||
// {"/behaviour/twitchSeperateWriteConnection", false};
|
// {"/behaviour/twitchSeperateWriteConnection", false};
|
||||||
|
|
||||||
|
|
|
@ -1817,6 +1817,10 @@ void ChannelView::hideEvent(QHideEvent *)
|
||||||
void ChannelView::showUserInfoPopup(const QString &userName)
|
void ChannelView::showUserInfoPopup(const QString &userName)
|
||||||
{
|
{
|
||||||
auto *userPopup = new UserInfoPopup;
|
auto *userPopup = new UserInfoPopup;
|
||||||
|
if (getSettings()->autoCloseUserPopup)
|
||||||
|
{
|
||||||
|
userPopup->setActionOnFocusLoss(BaseWindow::Delete);
|
||||||
|
}
|
||||||
userPopup->setData(userName, this->hasSourceChannel() ? this->sourceChannel_
|
userPopup->setData(userName, this->hasSourceChannel() ? this->sourceChannel_
|
||||||
: this->channel_);
|
: this->channel_);
|
||||||
QPoint offset(int(150 * this->scale()), int(70 * this->scale()));
|
QPoint offset(int(150 * this->scale()), int(70 * this->scale()));
|
||||||
|
|
|
@ -509,6 +509,8 @@ void GeneralPage::initLayout(SettingsLayout &layout)
|
||||||
s.mentionUsersWithComma);
|
s.mentionUsersWithComma);
|
||||||
layout.addCheckbox("Show joined users (< 1000 chatters)", s.showJoins);
|
layout.addCheckbox("Show joined users (< 1000 chatters)", s.showJoins);
|
||||||
layout.addCheckbox("Show parted users (< 1000 chatters)", s.showParts);
|
layout.addCheckbox("Show parted users (< 1000 chatters)", s.showParts);
|
||||||
|
layout.addCheckbox("Automatically close user popup when it loses focus",
|
||||||
|
s.autoCloseUserPopup);
|
||||||
layout.addCheckbox("Lowercase domains (anti-phishing)", s.lowercaseDomains);
|
layout.addCheckbox("Lowercase domains (anti-phishing)", s.lowercaseDomains);
|
||||||
layout.addCheckbox("Bold @usernames", s.boldUsernames);
|
layout.addCheckbox("Bold @usernames", s.boldUsernames);
|
||||||
layout.addCheckbox("Try to find usernames without @ prefix",
|
layout.addCheckbox("Try to find usernames without @ prefix",
|
||||||
|
|
Loading…
Reference in a new issue