mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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 progress = _animation.value(_isMuted ? 1. : 0.);
|
||||||
const auto color = anim::color(
|
const auto color = anim::color(
|
||||||
st::settingsIconBg1,
|
st::menuIconAttentionColor,
|
||||||
st::settingsIconBg2,
|
st::settingsIconBg2,
|
||||||
progress);
|
progress);
|
||||||
p.setPen(color);
|
p.setPen(color);
|
||||||
|
|
|
@ -36,6 +36,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "styles/style_settings.h"
|
#include "styles/style_settings.h"
|
||||||
#include "styles/style_menu_icons.h"
|
#include "styles/style_menu_icons.h"
|
||||||
|
|
||||||
|
#include <QAction>
|
||||||
|
|
||||||
namespace Settings {
|
namespace Settings {
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
@ -267,10 +269,11 @@ void FillMenu(
|
||||||
[=] { showOther(Information::Id()); },
|
[=] { showOther(Information::Id()); },
|
||||||
&st::menuIconInfo);
|
&st::menuIconInfo);
|
||||||
}
|
}
|
||||||
addAction(
|
const auto logout = addAction(
|
||||||
tr::lng_settings_logout(tr::now),
|
tr::lng_settings_logout(tr::now),
|
||||||
[=] { window->showLogoutConfirmation(); },
|
[=] { window->showLogoutConfirmation(); },
|
||||||
&st::menuIconLeave);
|
&st::menuIconLeaveAttention);
|
||||||
|
logout->setData(st::menuIconAttentionColor->c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -571,7 +571,7 @@ void SetupAccountsWrap(
|
||||||
addAction(tr::lng_menu_activate(tr::now), [=] {
|
addAction(tr::lng_menu_activate(tr::now), [=] {
|
||||||
Core::App().domain().activate(&session->account());
|
Core::App().domain().activate(&session->account());
|
||||||
}, &st::menuIconProfile);
|
}, &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) {
|
const auto callback = [=](Fn<void()> &&close) {
|
||||||
close();
|
close();
|
||||||
Core::App().logoutWithChecks(&session->account());
|
Core::App().logoutWithChecks(&session->account());
|
||||||
|
@ -584,7 +584,8 @@ void SetupAccountsWrap(
|
||||||
.confirmStyle = &st::attentionBoxButton,
|
.confirmStyle = &st::attentionBoxButton,
|
||||||
}),
|
}),
|
||||||
Ui::LayerOption::CloseOther);
|
Ui::LayerOption::CloseOther);
|
||||||
}, &st::menuIconLeave);
|
}, &st::menuIconLeaveAttention);
|
||||||
|
logout->setData(st::menuIconAttentionColor->c);
|
||||||
state->menu->popup(QCursor::pos());
|
state->menu->popup(QCursor::pos());
|
||||||
}, raw->lifetime());
|
}, raw->lifetime());
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,8 @@ dropdownMenuWithIcons: DropdownMenu(defaultDropdownMenu) {
|
||||||
}
|
}
|
||||||
|
|
||||||
menuIconColor: windowBoldFg;
|
menuIconColor: windowBoldFg;
|
||||||
|
menuIconAttentionColor: attentionButtonFg;
|
||||||
|
|
||||||
menuIconReactions: icon {{ "menu/read_reactions", menuIconColor }};
|
menuIconReactions: icon {{ "menu/read_reactions", menuIconColor }};
|
||||||
menuIconReply: icon {{ "menu/reply", menuIconColor }};
|
menuIconReply: icon {{ "menu/reply", menuIconColor }};
|
||||||
menuIconViewReplies: icon {{ "menu/view_replies", menuIconColor }};
|
menuIconViewReplies: icon {{ "menu/view_replies", menuIconColor }};
|
||||||
|
@ -67,7 +69,6 @@ menuIconExport: icon {{ "menu/export", menuIconColor }};
|
||||||
menuIconClear: icon {{ "menu/clear", menuIconColor }};
|
menuIconClear: icon {{ "menu/clear", menuIconColor }};
|
||||||
menuIconManage: icon {{ "menu/manage", menuIconColor }};
|
menuIconManage: icon {{ "menu/manage", menuIconColor }};
|
||||||
menuIconDiscussion: icon {{ "menu/discussion", menuIconColor }};
|
menuIconDiscussion: icon {{ "menu/discussion", menuIconColor }};
|
||||||
menuIconLeave: icon {{ "menu/leave", menuIconColor }};
|
|
||||||
menuIconCreatePoll: icon {{ "menu/create_poll", menuIconColor }};
|
menuIconCreatePoll: icon {{ "menu/create_poll", menuIconColor }};
|
||||||
menuIconQrCode: icon {{ "menu/qr_code", menuIconColor }};
|
menuIconQrCode: icon {{ "menu/qr_code", menuIconColor }};
|
||||||
menuIconExpand: icon {{ "menu/expand", menuIconColor }};
|
menuIconExpand: icon {{ "menu/expand", menuIconColor }};
|
||||||
|
@ -108,3 +109,6 @@ mediaMenuIconShowAll: icon {{ "menu/all_media", mediaviewMenuFg }};
|
||||||
|
|
||||||
menuIconStartStream: icon {{ "menu/start_stream", menuIconColor }};
|
menuIconStartStream: icon {{ "menu/start_stream", menuIconColor }};
|
||||||
menuIconStartStreamWith: icon {{ "menu/start_stream_with", 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()) {
|
if (_peer->isChannel()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_addAction(
|
const auto action = _addAction(
|
||||||
(_peer->isUser()
|
(_peer->isUser()
|
||||||
? tr::lng_profile_delete_conversation(tr::now)
|
? tr::lng_profile_delete_conversation(tr::now)
|
||||||
: tr::lng_profile_clear_and_exit(tr::now)),
|
: tr::lng_profile_clear_and_exit(tr::now)),
|
||||||
DeleteAndLeaveHandler(_controller, _peer),
|
DeleteAndLeaveHandler(_controller, _peer),
|
||||||
&st::menuIconDelete);
|
&st::menuIconDeleteAttention);
|
||||||
|
action->setData(st::menuIconAttentionColor->c);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Filler::addLeaveChat() {
|
void Filler::addLeaveChat() {
|
||||||
|
@ -514,12 +515,13 @@ void Filler::addLeaveChat() {
|
||||||
if (!channel || !channel->amIn()) {
|
if (!channel || !channel->amIn()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_addAction(
|
const auto leave = _addAction(
|
||||||
(_peer->isMegagroup()
|
(_peer->isMegagroup()
|
||||||
? tr::lng_profile_leave_group(tr::now)
|
? tr::lng_profile_leave_group(tr::now)
|
||||||
: tr::lng_profile_leave_channel(tr::now)),
|
: tr::lng_profile_leave_channel(tr::now)),
|
||||||
DeleteAndLeaveHandler(_controller, _peer),
|
DeleteAndLeaveHandler(_controller, _peer),
|
||||||
&st::menuIconLeave);
|
&st::menuIconLeaveAttention);
|
||||||
|
leave->setData(st::menuIconAttentionColor->c);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Filler::addBlockUser() {
|
void Filler::addBlockUser() {
|
||||||
|
@ -695,10 +697,11 @@ void Filler::addDeleteContact() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const auto controller = _controller;
|
const auto controller = _controller;
|
||||||
_addAction(
|
const auto action = _addAction(
|
||||||
tr::lng_info_delete_contact(tr::now),
|
tr::lng_info_delete_contact(tr::now),
|
||||||
[=] { PeerMenuDeleteContact(controller, user); },
|
[=] { PeerMenuDeleteContact(controller, user); },
|
||||||
&st::menuIconDelete);
|
&st::menuIconDeleteAttention);
|
||||||
|
action->setData(st::menuIconAttentionColor->c);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Filler::addManageChat() {
|
void Filler::addManageChat() {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 9f28a0b106311566d2adab8a7b82973accfdd944
|
Subproject commit 8d181e53c573639d8a4a7e66e89bc01791b0572b
|
Loading…
Add table
Reference in a new issue