2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Changed color of some sensitive menu items to attention one.

This commit is contained in:
23rd
2022-03-30 19:52:33 +03:00
committed by John Preston
parent ae25804d83
commit 06d17c6b2c
6 changed files with 24 additions and 13 deletions

View File

@@ -36,6 +36,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "styles/style_settings.h"
#include "styles/style_menu_icons.h"
#include <QAction>
namespace Settings {
namespace {
@@ -267,10 +269,11 @@ void FillMenu(
[=] { showOther(Information::Id()); },
&st::menuIconInfo);
}
addAction(
const auto logout = addAction(
tr::lng_settings_logout(tr::now),
[=] { window->showLogoutConfirmation(); },
&st::menuIconLeave);
&st::menuIconLeaveAttention);
logout->setData(st::menuIconAttentionColor->c);
}
}

View File

@@ -571,7 +571,7 @@ void SetupAccountsWrap(
addAction(tr::lng_menu_activate(tr::now), [=] {
Core::App().domain().activate(&session->account());
}, &st::menuIconProfile);
addAction(tr::lng_settings_logout(tr::now), [=] {
const auto logout = addAction(tr::lng_settings_logout(tr::now), [=] {
const auto callback = [=](Fn<void()> &&close) {
close();
Core::App().logoutWithChecks(&session->account());
@@ -584,7 +584,8 @@ void SetupAccountsWrap(
.confirmStyle = &st::attentionBoxButton,
}),
Ui::LayerOption::CloseOther);
}, &st::menuIconLeave);
}, &st::menuIconLeaveAttention);
logout->setData(st::menuIconAttentionColor->c);
state->menu->popup(QCursor::pos());
}, raw->lifetime());