mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-19 07:37:11 +02:00
Changed color of some sensitive menu items to attention one.
This commit is contained in:
parent
ae25804d83
commit
06d17c6b2c
6 changed files with 24 additions and 13 deletions
|
@ -89,7 +89,7 @@ void MuteItem::paintEvent(QPaintEvent *e) {
|
|||
|
||||
const auto progress = _animation.value(_isMuted ? 1. : 0.);
|
||||
const auto color = anim::color(
|
||||
st::settingsIconBg1,
|
||||
st::menuIconAttentionColor,
|
||||
st::settingsIconBg2,
|
||||
progress);
|
||||
p.setPen(color);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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());
|
||||
|
||||
|
|
|
@ -24,6 +24,8 @@ dropdownMenuWithIcons: DropdownMenu(defaultDropdownMenu) {
|
|||
}
|
||||
|
||||
menuIconColor: windowBoldFg;
|
||||
menuIconAttentionColor: attentionButtonFg;
|
||||
|
||||
menuIconReactions: icon {{ "menu/read_reactions", menuIconColor }};
|
||||
menuIconReply: icon {{ "menu/reply", menuIconColor }};
|
||||
menuIconViewReplies: icon {{ "menu/view_replies", menuIconColor }};
|
||||
|
@ -67,7 +69,6 @@ menuIconExport: icon {{ "menu/export", menuIconColor }};
|
|||
menuIconClear: icon {{ "menu/clear", menuIconColor }};
|
||||
menuIconManage: icon {{ "menu/manage", menuIconColor }};
|
||||
menuIconDiscussion: icon {{ "menu/discussion", menuIconColor }};
|
||||
menuIconLeave: icon {{ "menu/leave", menuIconColor }};
|
||||
menuIconCreatePoll: icon {{ "menu/create_poll", menuIconColor }};
|
||||
menuIconQrCode: icon {{ "menu/qr_code", menuIconColor }};
|
||||
menuIconExpand: icon {{ "menu/expand", menuIconColor }};
|
||||
|
@ -108,3 +109,6 @@ mediaMenuIconShowAll: icon {{ "menu/all_media", mediaviewMenuFg }};
|
|||
|
||||
menuIconStartStream: icon {{ "menu/start_stream", menuIconColor }};
|
||||
menuIconStartStreamWith: icon {{ "menu/start_stream_with", menuIconColor }};
|
||||
|
||||
menuIconDeleteAttention: icon {{ "menu/delete", menuIconAttentionColor }};
|
||||
menuIconLeaveAttention: icon {{ "menu/leave", menuIconAttentionColor }};
|
||||
|
|
|
@ -501,12 +501,13 @@ void Filler::addDeleteChat() {
|
|||
if (_peer->isChannel()) {
|
||||
return;
|
||||
}
|
||||
_addAction(
|
||||
const auto action = _addAction(
|
||||
(_peer->isUser()
|
||||
? tr::lng_profile_delete_conversation(tr::now)
|
||||
: tr::lng_profile_clear_and_exit(tr::now)),
|
||||
DeleteAndLeaveHandler(_controller, _peer),
|
||||
&st::menuIconDelete);
|
||||
&st::menuIconDeleteAttention);
|
||||
action->setData(st::menuIconAttentionColor->c);
|
||||
}
|
||||
|
||||
void Filler::addLeaveChat() {
|
||||
|
@ -514,12 +515,13 @@ void Filler::addLeaveChat() {
|
|||
if (!channel || !channel->amIn()) {
|
||||
return;
|
||||
}
|
||||
_addAction(
|
||||
const auto leave = _addAction(
|
||||
(_peer->isMegagroup()
|
||||
? tr::lng_profile_leave_group(tr::now)
|
||||
: tr::lng_profile_leave_channel(tr::now)),
|
||||
DeleteAndLeaveHandler(_controller, _peer),
|
||||
&st::menuIconLeave);
|
||||
&st::menuIconLeaveAttention);
|
||||
leave->setData(st::menuIconAttentionColor->c);
|
||||
}
|
||||
|
||||
void Filler::addBlockUser() {
|
||||
|
@ -695,10 +697,11 @@ void Filler::addDeleteContact() {
|
|||
return;
|
||||
}
|
||||
const auto controller = _controller;
|
||||
_addAction(
|
||||
const auto action = _addAction(
|
||||
tr::lng_info_delete_contact(tr::now),
|
||||
[=] { PeerMenuDeleteContact(controller, user); },
|
||||
&st::menuIconDelete);
|
||||
&st::menuIconDeleteAttention);
|
||||
action->setData(st::menuIconAttentionColor->c);
|
||||
}
|
||||
|
||||
void Filler::addManageChat() {
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 9f28a0b106311566d2adab8a7b82973accfdd944
|
||||
Subproject commit 8d181e53c573639d8a4a7e66e89bc01791b0572b
|
Loading…
Add table
Reference in a new issue