Update icons in settings / manage layers.
BIN
Telegram/Resources/icons/menu/antispam.png
Normal file
After Width: | Height: | Size: 761 B |
BIN
Telegram/Resources/icons/menu/antispam@2x.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
Telegram/Resources/icons/menu/antispam@3x.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
Telegram/Resources/icons/menu/bot_commands.png
Normal file
After Width: | Height: | Size: 538 B |
BIN
Telegram/Resources/icons/menu/bot_commands@2x.png
Normal file
After Width: | Height: | Size: 821 B |
BIN
Telegram/Resources/icons/menu/bot_commands@3x.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
Telegram/Resources/icons/menu/calls_receive.png
Normal file
After Width: | Height: | Size: 773 B |
BIN
Telegram/Resources/icons/menu/calls_receive@2x.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
Telegram/Resources/icons/menu/calls_receive@3x.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
Telegram/Resources/icons/menu/chat_discuss.png
Normal file
After Width: | Height: | Size: 751 B |
BIN
Telegram/Resources/icons/menu/chat_discuss@2x.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
Telegram/Resources/icons/menu/chat_discuss@3x.png
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
Telegram/Resources/icons/menu/devices.png
Normal file
After Width: | Height: | Size: 402 B |
BIN
Telegram/Resources/icons/menu/devices@2x.png
Normal file
After Width: | Height: | Size: 595 B |
BIN
Telegram/Resources/icons/menu/devices@3x.png
Normal file
After Width: | Height: | Size: 840 B |
BIN
Telegram/Resources/icons/menu/dock_bounce.png
Normal file
After Width: | Height: | Size: 497 B |
BIN
Telegram/Resources/icons/menu/dock_bounce@2x.png
Normal file
After Width: | Height: | Size: 808 B |
BIN
Telegram/Resources/icons/menu/dock_bounce@3x.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
Telegram/Resources/icons/menu/experimental.png
Normal file
After Width: | Height: | Size: 582 B |
BIN
Telegram/Resources/icons/menu/experimental@2x.png
Normal file
After Width: | Height: | Size: 991 B |
BIN
Telegram/Resources/icons/menu/experimental@3x.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
Telegram/Resources/icons/menu/faq.png
Normal file
After Width: | Height: | Size: 539 B |
BIN
Telegram/Resources/icons/menu/faq@2x.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
Telegram/Resources/icons/menu/faq@3x.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
Telegram/Resources/icons/menu/group_log.png
Normal file
After Width: | Height: | Size: 539 B |
BIN
Telegram/Resources/icons/menu/group_log@2x.png
Normal file
After Width: | Height: | Size: 941 B |
BIN
Telegram/Resources/icons/menu/group_log@3x.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
Telegram/Resources/icons/menu/group_reactions.png
Normal file
After Width: | Height: | Size: 629 B |
BIN
Telegram/Resources/icons/menu/group_reactions@2x.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
Telegram/Resources/icons/menu/group_reactions@3x.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
Telegram/Resources/icons/menu/groups_create.png
Normal file
After Width: | Height: | Size: 717 B |
BIN
Telegram/Resources/icons/menu/groups_create@2x.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
Telegram/Resources/icons/menu/groups_create@3x.png
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
Telegram/Resources/icons/menu/hide_members.png
Normal file
After Width: | Height: | Size: 809 B |
BIN
Telegram/Resources/icons/menu/hide_members@2x.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
Telegram/Resources/icons/menu/hide_members@3x.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
Telegram/Resources/icons/menu/info_notifications.png
Normal file
After Width: | Height: | Size: 461 B |
BIN
Telegram/Resources/icons/menu/info_notifications@2x.png
Normal file
After Width: | Height: | Size: 853 B |
BIN
Telegram/Resources/icons/menu/info_notifications@3x.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 467 B After Width: | Height: | Size: 467 B |
Before Width: | Height: | Size: 883 B After Width: | Height: | Size: 883 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
BIN
Telegram/Resources/icons/menu/lock.png
Normal file
After Width: | Height: | Size: 555 B |
BIN
Telegram/Resources/icons/menu/lock@2x.png
Normal file
After Width: | Height: | Size: 932 B |
BIN
Telegram/Resources/icons/menu/lock@3x.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
Telegram/Resources/icons/menu/network.png
Normal file
After Width: | Height: | Size: 492 B |
BIN
Telegram/Resources/icons/menu/network@2x.png
Normal file
After Width: | Height: | Size: 818 B |
BIN
Telegram/Resources/icons/menu/network@3x.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
Telegram/Resources/icons/menu/payment_email.png
Normal file
After Width: | Height: | Size: 757 B |
BIN
Telegram/Resources/icons/menu/payment_email@2x.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
Telegram/Resources/icons/menu/payment_email@3x.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
Telegram/Resources/icons/menu/power_usage.png
Normal file
After Width: | Height: | Size: 511 B |
BIN
Telegram/Resources/icons/menu/power_usage@2x.png
Normal file
After Width: | Height: | Size: 902 B |
BIN
Telegram/Resources/icons/menu/power_usage@3x.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
Telegram/Resources/icons/menu/recovery_email.png
Normal file
After Width: | Height: | Size: 508 B |
BIN
Telegram/Resources/icons/menu/recovery_email@2x.png
Normal file
After Width: | Height: | Size: 734 B |
BIN
Telegram/Resources/icons/menu/recovery_email@3x.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
Telegram/Resources/icons/menu/remove.png
Normal file
After Width: | Height: | Size: 516 B |
BIN
Telegram/Resources/icons/menu/remove@2x.png
Normal file
After Width: | Height: | Size: 823 B |
BIN
Telegram/Resources/icons/menu/remove@3x.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
Telegram/Resources/icons/menu/signed.png
Normal file
After Width: | Height: | Size: 578 B |
BIN
Telegram/Resources/icons/menu/signed@2x.png
Normal file
After Width: | Height: | Size: 1 KiB |
BIN
Telegram/Resources/icons/menu/signed@3x.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 519 B |
Before Width: | Height: | Size: 827 B |
Before Width: | Height: | Size: 1.3 KiB |
BIN
Telegram/Resources/icons/menu/storage.png
Normal file
After Width: | Height: | Size: 670 B |
BIN
Telegram/Resources/icons/menu/storage@2x.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
Telegram/Resources/icons/menu/storage@3x.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
Telegram/Resources/icons/menu/timer.png
Normal file
After Width: | Height: | Size: 608 B |
BIN
Telegram/Resources/icons/menu/timer@2x.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
Telegram/Resources/icons/menu/timer@3x.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
Telegram/Resources/icons/menu/topics.png
Normal file
After Width: | Height: | Size: 345 B |
BIN
Telegram/Resources/icons/menu/topics@2x.png
Normal file
After Width: | Height: | Size: 418 B |
BIN
Telegram/Resources/icons/menu/topics@3x.png
Normal file
After Width: | Height: | Size: 775 B |
|
@ -600,6 +600,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
"lng_settings_username_label" = "Username";
|
"lng_settings_username_label" = "Username";
|
||||||
"lng_settings_phone_label" = "Phone number";
|
"lng_settings_phone_label" = "Phone number";
|
||||||
"lng_settings_username_add" = "Add username";
|
"lng_settings_username_add" = "Add username";
|
||||||
|
"lng_settings_username_about" = "Username lets people contact you on Telegram without needing your phone number.";
|
||||||
|
"lng_settings_add_account_about" = "You can add up to four accounts with different phone numbers.";
|
||||||
"lng_settings_peer_to_peer_about" = "Disabling peer-to-peer will relay all calls through Telegram servers to avoid revealing your IP address, but may slightly decrease audio quality.";
|
"lng_settings_peer_to_peer_about" = "Disabling peer-to-peer will relay all calls through Telegram servers to avoid revealing your IP address, but may slightly decrease audio quality.";
|
||||||
"lng_settings_advanced" = "Advanced";
|
"lng_settings_advanced" = "Advanced";
|
||||||
"lng_settings_stickers_emoji" = "Stickers and emoji";
|
"lng_settings_stickers_emoji" = "Stickers and emoji";
|
||||||
|
@ -612,9 +614,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
"lng_settings_theme_accent_title" = "Choose accent color";
|
"lng_settings_theme_accent_title" = "Choose accent color";
|
||||||
"lng_settings_data_storage" = "Data and storage";
|
"lng_settings_data_storage" = "Data and storage";
|
||||||
"lng_settings_information" = "Edit profile";
|
"lng_settings_information" = "Edit profile";
|
||||||
|
"lng_settings_my_account" = "My Account";
|
||||||
"lng_settings_security" = "Security";
|
"lng_settings_security" = "Security";
|
||||||
"lng_settings_passcode_title" = "Local passcode";
|
"lng_settings_passcode_title" = "Local passcode";
|
||||||
"lng_settings_sessions_title" = "Active sessions";
|
"lng_settings_sessions_title" = "Active sessions";
|
||||||
|
"lng_settings_sessions_about" = "Review the list of devices where you are logged into your Telegram account.";
|
||||||
"lng_settings_archive_title" = "Archive Settings";
|
"lng_settings_archive_title" = "Archive Settings";
|
||||||
"lng_settings_new_unknown" = "New chats from unknown users";
|
"lng_settings_new_unknown" = "New chats from unknown users";
|
||||||
"lng_settings_auto_archive" = "Archive and Mute";
|
"lng_settings_auto_archive" = "Archive and Mute";
|
||||||
|
@ -642,6 +646,13 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
"lng_settings_sensitive_about" = "Display sensitive media in public channels on all your Telegram devices.";
|
"lng_settings_sensitive_about" = "Display sensitive media in public channels on all your Telegram devices.";
|
||||||
"lng_settings_security_bots" = "Bots and websites";
|
"lng_settings_security_bots" = "Bots and websites";
|
||||||
"lng_settings_clear_payment_info" = "Clear Payment and Shipping Info";
|
"lng_settings_clear_payment_info" = "Clear Payment and Shipping Info";
|
||||||
|
"lng_settings_logged_in" = "Logged In with Telegram";
|
||||||
|
"lng_settings_logged_in_about" = "Websites where you've used Telegram to log in.";
|
||||||
|
"lng_settings_logged_in_title" = "Logged In with Telegram";
|
||||||
|
"lng_settings_logged_in_description" = "You can log in on websites that support signing in with Telegram.";
|
||||||
|
"lng_settings_disconnect_all" = "Disconnect All Websites";
|
||||||
|
"lng_settings_connected_title" = "Connected websites";
|
||||||
|
"lng_settings_connected_about" = "Click to disconnect from your Telegram account.";
|
||||||
|
|
||||||
"lng_settings_power_menu" = "Battery and Animations";
|
"lng_settings_power_menu" = "Battery and Animations";
|
||||||
"lng_settings_power_title" = "Power Usage";
|
"lng_settings_power_title" = "Power Usage";
|
||||||
|
|
|
@ -298,17 +298,11 @@ void EditPrivacyBox::setupContent() {
|
||||||
CreateButton(
|
CreateButton(
|
||||||
content,
|
content,
|
||||||
rpl::duplicate(text),
|
rpl::duplicate(text),
|
||||||
st::settingsButton,
|
st::settingsButtonNoIcon)));
|
||||||
{
|
|
||||||
(always
|
|
||||||
? &st::settingsIconPlus
|
|
||||||
: &st::settingsIconMinus),
|
|
||||||
always ? kIconGreen : kIconRed,
|
|
||||||
})));
|
|
||||||
CreateRightLabel(
|
CreateRightLabel(
|
||||||
button->entity(),
|
button->entity(),
|
||||||
std::move(label),
|
std::move(label),
|
||||||
st::settingsButton,
|
st::settingsButtonNoIcon,
|
||||||
std::move(text));
|
std::move(text));
|
||||||
button->toggleOn(rpl::duplicate(
|
button->toggleOn(rpl::duplicate(
|
||||||
optionValue
|
optionValue
|
||||||
|
@ -384,9 +378,9 @@ void EditPrivacyBox::setupContent() {
|
||||||
});
|
});
|
||||||
addButton(tr::lng_cancel(), [this] { closeBox(); });
|
addButton(tr::lng_cancel(), [this] { closeBox(); });
|
||||||
|
|
||||||
const auto linkHeight = st::settingsButton.padding.top()
|
const auto linkHeight = st::settingsButtonNoIcon.padding.top()
|
||||||
+ st::settingsButton.height
|
+ st::settingsButtonNoIcon.height
|
||||||
+ st::settingsButton.padding.bottom();
|
+ st::settingsButtonNoIcon.padding.bottom();
|
||||||
|
|
||||||
widthValue(
|
widthValue(
|
||||||
) | rpl::start_with_next([=](int width) {
|
) | rpl::start_with_next([=](int width) {
|
||||||
|
|
|
@ -666,7 +666,7 @@ void EditFilterBox(
|
||||||
content,
|
content,
|
||||||
tr::lng_filters_add_chats(),
|
tr::lng_filters_add_chats(),
|
||||||
st::settingsButtonActive,
|
st::settingsButtonActive,
|
||||||
{ &st::settingsIconAdd, 0, IconType::Round, &st::windowBgActive });
|
{ &st::settingsIconAdd, IconType::Round, &st::windowBgActive });
|
||||||
|
|
||||||
const auto include = SetupChatsPreview(
|
const auto include = SetupChatsPreview(
|
||||||
content,
|
content,
|
||||||
|
@ -693,7 +693,7 @@ void EditFilterBox(
|
||||||
excludeInner,
|
excludeInner,
|
||||||
tr::lng_filters_remove_chats(),
|
tr::lng_filters_remove_chats(),
|
||||||
st::settingsButtonActive,
|
st::settingsButtonActive,
|
||||||
{ &st::settingsIconRemove, 0, IconType::Round, &st::windowBgActive });
|
{ &st::settingsIconRemove, IconType::Round, &st::windowBgActive });
|
||||||
|
|
||||||
const auto exclude = SetupChatsPreview(
|
const auto exclude = SetupChatsPreview(
|
||||||
excludeInner,
|
excludeInner,
|
||||||
|
@ -746,13 +746,13 @@ void EditFilterBox(
|
||||||
state->hasLinks.value() | rpl::map(!rpl::mappers::_1),
|
state->hasLinks.value() | rpl::map(!rpl::mappers::_1),
|
||||||
tr::lng_filters_link_create(),
|
tr::lng_filters_link_create(),
|
||||||
st::settingsButtonActive,
|
st::settingsButtonActive,
|
||||||
{ &st::settingsFolderShareIcon, 0, IconType::Simple });
|
{ &st::settingsFolderShareIcon, IconType::Simple });
|
||||||
const auto addLink = AddToggledButton(
|
const auto addLink = AddToggledButton(
|
||||||
content,
|
content,
|
||||||
state->hasLinks.value(),
|
state->hasLinks.value(),
|
||||||
tr::lng_group_invite_add(),
|
tr::lng_group_invite_add(),
|
||||||
st::settingsButtonActive,
|
st::settingsButtonActive,
|
||||||
{ &st::settingsIconAdd, 0, IconType::Round, &st::windowBgActive });
|
{ &st::settingsIconAdd, IconType::Round, &st::windowBgActive });
|
||||||
|
|
||||||
SetupFilterLinks(
|
SetupFilterLinks(
|
||||||
content,
|
content,
|
||||||
|
|
|
@ -23,6 +23,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "main/main_session.h"
|
#include "main/main_session.h"
|
||||||
#include "window/window_session_controller.h"
|
#include "window/window_session_controller.h"
|
||||||
#include "styles/style_layers.h"
|
#include "styles/style_layers.h"
|
||||||
|
#include "styles/style_menu_icons.h"
|
||||||
#include "styles/style_boxes.h"
|
#include "styles/style_boxes.h"
|
||||||
#include "styles/style_info.h"
|
#include "styles/style_info.h"
|
||||||
#include "styles/style_settings.h"
|
#include "styles/style_settings.h"
|
||||||
|
@ -271,7 +272,7 @@ void Controller::choose(not_null<ChatData*> chat) {
|
||||||
above,
|
above,
|
||||||
tr::lng_manage_discussion_group_create(),
|
tr::lng_manage_discussion_group_create(),
|
||||||
st::infoCreateLinkedChatButton,
|
st::infoCreateLinkedChatButton,
|
||||||
{ &st::settingsIconChat, Settings::kIconLightBlue }
|
{ &st::menuIconGroupCreate }
|
||||||
)->addClickHandler([=, parent = above.data()] {
|
)->addClickHandler([=, parent = above.data()] {
|
||||||
const auto guarded = crl::guard(parent, callback);
|
const auto guarded = crl::guard(parent, callback);
|
||||||
navigation->uiShow()->showBox(Box<GroupInfoBox>(
|
navigation->uiShow()->showBox(Box<GroupInfoBox>(
|
||||||
|
@ -291,7 +292,7 @@ void Controller::choose(not_null<ChatData*> chat) {
|
||||||
? tr::lng_manage_discussion_group_unlink
|
? tr::lng_manage_discussion_group_unlink
|
||||||
: tr::lng_manage_linked_channel_unlink)(),
|
: tr::lng_manage_linked_channel_unlink)(),
|
||||||
st::infoUnlinkChatButton,
|
st::infoUnlinkChatButton,
|
||||||
{ &st::settingsIconMinus, Settings::kIconRed }
|
{ &st::menuIconRemove }
|
||||||
)->addClickHandler([=] { callback(nullptr); });
|
)->addClickHandler([=] { callback(nullptr); });
|
||||||
Settings::AddSkip(below);
|
Settings::AddSkip(below);
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "apiwrap.h"
|
#include "apiwrap.h"
|
||||||
#include "lang/lang_keys.h"
|
#include "lang/lang_keys.h"
|
||||||
#include "styles/style_info.h"
|
#include "styles/style_info.h"
|
||||||
|
#include "styles/style_menu_icons.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
@ -53,7 +54,7 @@ namespace {
|
||||||
rpl::single(QString()),
|
rpl::single(QString()),
|
||||||
[] {},
|
[] {},
|
||||||
st::manageGroupTopicsButton,
|
st::manageGroupTopicsButton,
|
||||||
{ &st::infoRoundedIconHideMembers, Settings::kIconDarkBlue }
|
{ &st::menuIconHideMembers }
|
||||||
))->toggleOn(rpl::single(
|
))->toggleOn(rpl::single(
|
||||||
(megagroup->flags() & ChannelDataFlag::ParticipantsHidden) != 0
|
(megagroup->flags() & ChannelDataFlag::ParticipantsHidden) != 0
|
||||||
) | rpl::then(state->toggled.events()));
|
) | rpl::then(state->toggled.events()));
|
||||||
|
|
|
@ -1684,7 +1684,7 @@ base::unique_qptr<Ui::PopupMenu> ParticipantsBoxController::rowContextMenu(
|
||||||
result->addAction(
|
result->addAction(
|
||||||
tr::lng_context_restrict_user(tr::now),
|
tr::lng_context_restrict_user(tr::now),
|
||||||
crl::guard(this, [=] { showRestricted(user); }),
|
crl::guard(this, [=] { showRestricted(user); }),
|
||||||
&st::menuIconRestrict);
|
&st::menuIconPermissions);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (user && _additional.canRemoveParticipant(participant)) {
|
if (user && _additional.canRemoveParticipant(participant)) {
|
||||||
|
|
|
@ -61,6 +61,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "info/profile/info_profile_icon.h"
|
#include "info/profile/info_profile_icon.h"
|
||||||
#include "api/api_invite_links.h"
|
#include "api/api_invite_links.h"
|
||||||
#include "styles/style_layers.h"
|
#include "styles/style_layers.h"
|
||||||
|
#include "styles/style_menu_icons.h"
|
||||||
#include "styles/style_boxes.h"
|
#include "styles/style_boxes.h"
|
||||||
#include "styles/style_info.h"
|
#include "styles/style_info.h"
|
||||||
#include "styles/style_settings.h"
|
#include "styles/style_settings.h"
|
||||||
|
@ -307,11 +308,9 @@ private:
|
||||||
void fillPendingRequestsButton();
|
void fillPendingRequestsButton();
|
||||||
|
|
||||||
void fillBotUsernamesButton();
|
void fillBotUsernamesButton();
|
||||||
#if 0 // Enable after design improvements.
|
|
||||||
void fillBotEditIntroButton();
|
void fillBotEditIntroButton();
|
||||||
void fillBotEditCommandsButton();
|
void fillBotEditCommandsButton();
|
||||||
void fillBotEditSettingsButton();
|
void fillBotEditSettingsButton();
|
||||||
#endif
|
|
||||||
|
|
||||||
void submitTitle();
|
void submitTitle();
|
||||||
void submitDescription();
|
void submitDescription();
|
||||||
|
@ -348,9 +347,7 @@ private:
|
||||||
void continueSave();
|
void continueSave();
|
||||||
void cancelSave();
|
void cancelSave();
|
||||||
|
|
||||||
#if 0 // Enable after design improvements.
|
|
||||||
void toggleBotManager(const QString &command);
|
void toggleBotManager(const QString &command);
|
||||||
#endif
|
|
||||||
|
|
||||||
void togglePreHistoryHidden(
|
void togglePreHistoryHidden(
|
||||||
not_null<ChannelData*> channel,
|
not_null<ChannelData*> channel,
|
||||||
|
@ -605,7 +602,7 @@ object_ptr<Ui::RpWidget> Controller::createStickersEdit() {
|
||||||
controller->show(
|
controller->show(
|
||||||
Box<StickersBox>(controller->uiShow(), channel));
|
Box<StickersBox>(controller->uiShow(), channel));
|
||||||
},
|
},
|
||||||
{ &st::settingsIconStickers, Settings::kIconLightOrange });
|
{ &st::menuIconStickers });
|
||||||
|
|
||||||
Settings::AddSkip(container, bottomSkip);
|
Settings::AddSkip(container, bottomSkip);
|
||||||
|
|
||||||
|
@ -770,9 +767,6 @@ void Controller::fillPrivacyTypeButton() {
|
||||||
&& _peer->asChannel()->requestToJoin()),
|
&& _peer->asChannel()->requestToJoin()),
|
||||||
};
|
};
|
||||||
const auto isGroup = (_peer->isChat() || _peer->isMegagroup());
|
const auto isGroup = (_peer->isChat() || _peer->isMegagroup());
|
||||||
const auto icon = isGroup
|
|
||||||
? &st::settingsIconGroup
|
|
||||||
: &st::settingsIconChannel;
|
|
||||||
AddButtonWithText(
|
AddButtonWithText(
|
||||||
_controls.buttonsLayout,
|
_controls.buttonsLayout,
|
||||||
(hasLocation
|
(hasLocation
|
||||||
|
@ -798,7 +792,7 @@ void Controller::fillPrivacyTypeButton() {
|
||||||
: tr::lng_manage_private_peer_title)();
|
: tr::lng_manage_private_peer_title)();
|
||||||
}) | rpl::flatten_latest(),
|
}) | rpl::flatten_latest(),
|
||||||
[=] { showEditPeerTypeBox(); },
|
[=] { showEditPeerTypeBox(); },
|
||||||
{ icon, Settings::kIconLightBlue });
|
{ &st::menuIconCustomize });
|
||||||
|
|
||||||
_privacyTypeUpdates.fire_copy(_typeDataSavedValue->privacy);
|
_privacyTypeUpdates.fire_copy(_typeDataSavedValue->privacy);
|
||||||
}
|
}
|
||||||
|
@ -839,7 +833,7 @@ void Controller::fillLinkedChatButton() {
|
||||||
std::move(text),
|
std::move(text),
|
||||||
std::move(label),
|
std::move(label),
|
||||||
[=] { showEditLinkedChatBox(); },
|
[=] { showEditLinkedChatBox(); },
|
||||||
{ &st::settingsIconChat, Settings::kIconGreen });
|
{ isGroup ? &st::menuIconChannel : &st::menuIconGroups });
|
||||||
_linkedChatUpdates.fire_copy(*_linkedChatSavedValue);
|
_linkedChatUpdates.fire_copy(*_linkedChatSavedValue);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
@ -867,7 +861,7 @@ void Controller::fillForumButton() {
|
||||||
rpl::single(QString()),
|
rpl::single(QString()),
|
||||||
[] {},
|
[] {},
|
||||||
st::manageGroupTopicsButton,
|
st::manageGroupTopicsButton,
|
||||||
{ &st::settingsIconTopics, Settings::kIconPurple }));
|
{ &st::menuIconTopics }));
|
||||||
const auto unlocks = std::make_shared<rpl::event_stream<bool>>();
|
const auto unlocks = std::make_shared<rpl::event_stream<bool>>();
|
||||||
button->toggleOn(
|
button->toggleOn(
|
||||||
rpl::single(_peer->isForum()) | rpl::then(unlocks->events())
|
rpl::single(_peer->isForum()) | rpl::then(unlocks->events())
|
||||||
|
@ -924,7 +918,7 @@ void Controller::fillSignaturesButton() {
|
||||||
tr::lng_edit_sign_messages(),
|
tr::lng_edit_sign_messages(),
|
||||||
rpl::single(QString()),
|
rpl::single(QString()),
|
||||||
[] {},
|
[] {},
|
||||||
{ &st::infoRoundedIconSignature, Settings::kIconLightBlue }
|
{ &st::menuIconSigned }
|
||||||
)->toggleOn(rpl::single(channel->addsSignature())
|
)->toggleOn(rpl::single(channel->addsSignature())
|
||||||
)->toggledValue(
|
)->toggledValue(
|
||||||
) | rpl::start_with_next([=](bool toggled) {
|
) | rpl::start_with_next([=](bool toggled) {
|
||||||
|
@ -986,7 +980,7 @@ void Controller::fillHistoryVisibilityButton() {
|
||||||
: tr::lng_manage_history_visibility_hidden)();
|
: tr::lng_manage_history_visibility_hidden)();
|
||||||
}) | rpl::flatten_latest(),
|
}) | rpl::flatten_latest(),
|
||||||
buttonCallback,
|
buttonCallback,
|
||||||
{ &st::settingsIconChat, Settings::kIconGreen });
|
{ &st::menuIconChatBubble });
|
||||||
|
|
||||||
updateHistoryVisibility->fire_copy(*_historyVisibilitySavedValue);
|
updateHistoryVisibility->fire_copy(*_historyVisibilitySavedValue);
|
||||||
|
|
||||||
|
@ -1001,11 +995,9 @@ void Controller::fillManageSection() {
|
||||||
|
|
||||||
AddSkip(container, 0);
|
AddSkip(container, 0);
|
||||||
fillBotUsernamesButton();
|
fillBotUsernamesButton();
|
||||||
#if 0 // Enable after design improvements.
|
|
||||||
fillBotEditIntroButton();
|
fillBotEditIntroButton();
|
||||||
fillBotEditCommandsButton();
|
fillBotEditCommandsButton();
|
||||||
fillBotEditSettingsButton();
|
fillBotEditSettingsButton();
|
||||||
#endif
|
|
||||||
Settings::AddSkip(
|
Settings::AddSkip(
|
||||||
container,
|
container,
|
||||||
st::editPeerTopButtonsLayoutSkipCustomBottom);
|
st::editPeerTopButtonsLayoutSkipCustomBottom);
|
||||||
|
@ -1174,7 +1166,7 @@ void Controller::fillManageSection() {
|
||||||
Data::PeerAllowedReactions(_peer),
|
Data::PeerAllowedReactions(_peer),
|
||||||
done));
|
done));
|
||||||
},
|
},
|
||||||
{ &st::infoRoundedIconReactions, Settings::kIconRed });
|
{ &st::menuIconGroupReactions });
|
||||||
}
|
}
|
||||||
if (canEditPermissions) {
|
if (canEditPermissions) {
|
||||||
AddButtonWithCount(
|
AddButtonWithCount(
|
||||||
|
@ -1193,7 +1185,7 @@ void Controller::fillManageSection() {
|
||||||
});
|
});
|
||||||
}) | rpl::flatten_latest(),
|
}) | rpl::flatten_latest(),
|
||||||
[=] { ShowEditPermissions(_navigation, _peer); },
|
[=] { ShowEditPermissions(_navigation, _peer); },
|
||||||
{ &st::settingsIconKey, Settings::kIconGreen });
|
{ &st::menuIconPermissions });
|
||||||
}
|
}
|
||||||
if (canEditInviteLinks) {
|
if (canEditInviteLinks) {
|
||||||
auto count = Info::Profile::MigratedOrMeValue(
|
auto count = Info::Profile::MigratedOrMeValue(
|
||||||
|
@ -1227,7 +1219,7 @@ void Controller::fillManageSection() {
|
||||||
0,
|
0,
|
||||||
0));
|
0));
|
||||||
},
|
},
|
||||||
{ &st::infoRoundedIconInviteLinks, Settings::kIconLightOrange });
|
{ &st::menuIconLinks });
|
||||||
wrap->toggle(true, anim::type::instant);
|
wrap->toggle(true, anim::type::instant);
|
||||||
}
|
}
|
||||||
if (canViewAdmins) {
|
if (canViewAdmins) {
|
||||||
|
@ -1246,7 +1238,7 @@ void Controller::fillManageSection() {
|
||||||
_peer,
|
_peer,
|
||||||
ParticipantsBoxController::Role::Admins);
|
ParticipantsBoxController::Role::Admins);
|
||||||
},
|
},
|
||||||
{ &st::infoRoundedIconAdministrators, Settings::kIconLightBlue });
|
{ &st::menuIconAdmin });
|
||||||
}
|
}
|
||||||
if (canViewMembers) {
|
if (canViewMembers) {
|
||||||
AddButtonWithCount(
|
AddButtonWithCount(
|
||||||
|
@ -1266,7 +1258,7 @@ void Controller::fillManageSection() {
|
||||||
_peer,
|
_peer,
|
||||||
ParticipantsBoxController::Role::Members);
|
ParticipantsBoxController::Role::Members);
|
||||||
},
|
},
|
||||||
{ &st::settingsIconGroup, Settings::kIconDarkBlue });
|
{ &st::menuIconGroups });
|
||||||
}
|
}
|
||||||
|
|
||||||
fillPendingRequestsButton();
|
fillPendingRequestsButton();
|
||||||
|
@ -1283,7 +1275,7 @@ void Controller::fillManageSection() {
|
||||||
_peer,
|
_peer,
|
||||||
ParticipantsBoxController::Role::Kicked);
|
ParticipantsBoxController::Role::Kicked);
|
||||||
},
|
},
|
||||||
{ &st::settingsIconMinus, Settings::kIconRed });
|
{ &st::menuIconRemove });
|
||||||
}
|
}
|
||||||
if (hasRecentActions) {
|
if (hasRecentActions) {
|
||||||
auto callback = [=] {
|
auto callback = [=] {
|
||||||
|
@ -1295,7 +1287,7 @@ void Controller::fillManageSection() {
|
||||||
tr::lng_manage_peer_recent_actions(),
|
tr::lng_manage_peer_recent_actions(),
|
||||||
rpl::single(QString()), //Empty count.
|
rpl::single(QString()), //Empty count.
|
||||||
std::move(callback),
|
std::move(callback),
|
||||||
{ &st::infoRoundedIconRecentActions, Settings::kIconPurple });
|
{ &st::menuIconGroupLog });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (canEditStickers || canDeleteChannel) {
|
if (canEditStickers || canDeleteChannel) {
|
||||||
|
@ -1337,7 +1329,7 @@ void Controller::fillPendingRequestsButton() {
|
||||||
: tr::lng_manage_peer_requests_channel()),
|
: tr::lng_manage_peer_requests_channel()),
|
||||||
rpl::duplicate(pendingRequestsCount) | ToPositiveNumberString(),
|
rpl::duplicate(pendingRequestsCount) | ToPositiveNumberString(),
|
||||||
[=] { RequestsBoxController::Start(_navigation, _peer); },
|
[=] { RequestsBoxController::Start(_navigation, _peer); },
|
||||||
{ &st::infoRoundedIconRequests, Settings::kIconRed });
|
{ &st::menuIconInvite });
|
||||||
std::move(
|
std::move(
|
||||||
pendingRequestsCount
|
pendingRequestsCount
|
||||||
) | rpl::start_with_next([=](int count) {
|
) | rpl::start_with_next([=](int count) {
|
||||||
|
@ -1396,10 +1388,9 @@ void Controller::fillBotUsernamesButton() {
|
||||||
[=] {
|
[=] {
|
||||||
_navigation->uiShow()->showBox(Box(UsernamesBox, user));
|
_navigation->uiShow()->showBox(Box(UsernamesBox, user));
|
||||||
},
|
},
|
||||||
{ &st::infoRoundedIconInviteLinks, Settings::kIconLightOrange });
|
{ &st::menuIconLinks });
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0 // Enable after design improvements.
|
|
||||||
void Controller::fillBotEditIntroButton() {
|
void Controller::fillBotEditIntroButton() {
|
||||||
Expects(_isBot);
|
Expects(_isBot);
|
||||||
|
|
||||||
|
@ -1409,7 +1400,7 @@ void Controller::fillBotEditIntroButton() {
|
||||||
tr::lng_manage_peer_bot_edit_intro(),
|
tr::lng_manage_peer_bot_edit_intro(),
|
||||||
rpl::never<QString>(),
|
rpl::never<QString>(),
|
||||||
[=] { toggleBotManager(u"%1-intro"_q.arg(user->username())); },
|
[=] { toggleBotManager(u"%1-intro"_q.arg(user->username())); },
|
||||||
{ &st::settingsIconChat, Settings::kIconLightBlue });
|
{ &st::menuIconEdit });
|
||||||
}
|
}
|
||||||
|
|
||||||
void Controller::fillBotEditCommandsButton() {
|
void Controller::fillBotEditCommandsButton() {
|
||||||
|
@ -1421,7 +1412,7 @@ void Controller::fillBotEditCommandsButton() {
|
||||||
tr::lng_manage_peer_bot_edit_commands(),
|
tr::lng_manage_peer_bot_edit_commands(),
|
||||||
rpl::never<QString>(),
|
rpl::never<QString>(),
|
||||||
[=] { toggleBotManager(u"%1-commands"_q.arg(user->username())); },
|
[=] { toggleBotManager(u"%1-commands"_q.arg(user->username())); },
|
||||||
{ &st::settingsIconChat, Settings::kIconLightBlue });
|
{ &st::menuIconBotCommands });
|
||||||
}
|
}
|
||||||
|
|
||||||
void Controller::fillBotEditSettingsButton() {
|
void Controller::fillBotEditSettingsButton() {
|
||||||
|
@ -1433,9 +1424,8 @@ void Controller::fillBotEditSettingsButton() {
|
||||||
tr::lng_manage_peer_bot_edit_settings(),
|
tr::lng_manage_peer_bot_edit_settings(),
|
||||||
rpl::never<QString>(),
|
rpl::never<QString>(),
|
||||||
[=] { toggleBotManager(user->username()); },
|
[=] { toggleBotManager(user->username()); },
|
||||||
{ &st::settingsIconChat, Settings::kIconLightBlue });
|
{ &st::menuIconSettings });
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
void Controller::submitTitle() {
|
void Controller::submitTitle() {
|
||||||
Expects(_controls.title != nullptr);
|
Expects(_controls.title != nullptr);
|
||||||
|
@ -1910,7 +1900,6 @@ void Controller::saveHistoryVisibility() {
|
||||||
[=] { cancelSave(); });
|
[=] { cancelSave(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0 // Enable after design improvements.
|
|
||||||
void Controller::toggleBotManager(const QString &command) {
|
void Controller::toggleBotManager(const QString &command) {
|
||||||
const auto controller = _navigation->parentController();
|
const auto controller = _navigation->parentController();
|
||||||
_api.request(MTPcontacts_ResolveUsername(
|
_api.request(MTPcontacts_ResolveUsername(
|
||||||
|
@ -1926,7 +1915,6 @@ void Controller::toggleBotManager(const QString &command) {
|
||||||
}
|
}
|
||||||
}).send();
|
}).send();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
void Controller::togglePreHistoryHidden(
|
void Controller::togglePreHistoryHidden(
|
||||||
not_null<ChannelData*> channel,
|
not_null<ChannelData*> channel,
|
||||||
|
|
|
@ -35,6 +35,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "styles/style_layers.h"
|
#include "styles/style_layers.h"
|
||||||
#include "styles/style_boxes.h"
|
#include "styles/style_boxes.h"
|
||||||
#include "styles/style_info.h"
|
#include "styles/style_info.h"
|
||||||
|
#include "styles/style_menu_icons.h"
|
||||||
#include "styles/style_window.h"
|
#include "styles/style_window.h"
|
||||||
#include "styles/style_settings.h"
|
#include "styles/style_settings.h"
|
||||||
|
|
||||||
|
@ -818,7 +819,7 @@ void AddSuggestGigagroup(
|
||||||
rpl::single(QString()),
|
rpl::single(QString()),
|
||||||
std::move(callback),
|
std::move(callback),
|
||||||
st::manageGroupTopicsButton,
|
st::manageGroupTopicsButton,
|
||||||
{ &st::settingsIconAskQuestion, Settings::kIconGreen }));
|
{ &st::menuIconChatDiscuss }));
|
||||||
|
|
||||||
container->add(
|
container->add(
|
||||||
object_ptr<Ui::DividerLabel>(
|
object_ptr<Ui::DividerLabel>(
|
||||||
|
@ -854,7 +855,7 @@ void AddBannedButtons(
|
||||||
ParticipantsBoxController::Role::Restricted);
|
ParticipantsBoxController::Role::Restricted);
|
||||||
},
|
},
|
||||||
st::manageGroupTopicsButton,
|
st::manageGroupTopicsButton,
|
||||||
{ &st::settingsIconKey, Settings::kIconLightOrange }));
|
{ &st::menuIconPermissions }));
|
||||||
if (channel) {
|
if (channel) {
|
||||||
container->add(EditPeerInfoBox::CreateButton(
|
container->add(EditPeerInfoBox::CreateButton(
|
||||||
container,
|
container,
|
||||||
|
@ -868,7 +869,7 @@ void AddBannedButtons(
|
||||||
ParticipantsBoxController::Role::Kicked);
|
ParticipantsBoxController::Role::Kicked);
|
||||||
},
|
},
|
||||||
st::manageGroupTopicsButton,
|
st::manageGroupTopicsButton,
|
||||||
{ &st::settingsIconMinus, Settings::kIconRed }));
|
{ &st::menuIconRemove }));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -278,7 +278,6 @@ void RingtonesBox(
|
||||||
st::ringtonesBoxButton,
|
st::ringtonesBoxButton,
|
||||||
{
|
{
|
||||||
&st::settingsIconAdd,
|
&st::settingsIconAdd,
|
||||||
0,
|
|
||||||
Settings::IconType::Round,
|
Settings::IconType::Round,
|
||||||
&st::windowBgActive
|
&st::windowBgActive
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -1468,7 +1468,7 @@ void InnerWidget::suggestRestrictParticipant(
|
||||||
editRestrictions(false, ChatRestrictionsInfo());
|
editRestrictions(false, ChatRestrictionsInfo());
|
||||||
}).send();
|
}).send();
|
||||||
}
|
}
|
||||||
}, &st::menuIconRestrict);
|
}, &st::menuIconPermissions);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InnerWidget::restrictParticipant(
|
void InnerWidget::restrictParticipant(
|
||||||
|
|
|
@ -1199,7 +1199,7 @@ void AddPollActions(
|
||||||
.confirmText = tr::lng_polls_stop_sure(),
|
.confirmText = tr::lng_polls_stop_sure(),
|
||||||
.cancelText = tr::lng_cancel(),
|
.cancelText = tr::lng_cancel(),
|
||||||
}));
|
}));
|
||||||
}, &st::menuIconStopPoll);
|
}, &st::menuIconRemove);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -410,15 +410,6 @@ infoIconMediaStories: icon {{ "info/info_media_stories", infoIconFg }};
|
||||||
infoIconMediaStoriesArchive: icon {{ "info/info_stories_archive", infoIconFg }};
|
infoIconMediaStoriesArchive: icon {{ "info/info_stories_archive", infoIconFg }};
|
||||||
infoIconMediaStoriesRecent: icon {{ "info/info_stories_recent", infoIconFg }};
|
infoIconMediaStoriesRecent: icon {{ "info/info_stories_recent", infoIconFg }};
|
||||||
|
|
||||||
infoRoundedIconRequests: icon {{ "info/edit/group_manage_join_requests", settingsIconFg }};
|
|
||||||
infoRoundedIconRecentActions: icon {{ "info/edit/group_manage_actions", settingsIconFg }};
|
|
||||||
infoRoundedIconAdministrators: icon {{ "info/edit/group_manage_admins", settingsIconFg }};
|
|
||||||
infoRoundedIconInviteLinks: icon {{ "info/edit/group_manage_links", settingsIconFg }};
|
|
||||||
infoRoundedIconReactions: icon {{ "info/edit/group_manage_reactions", settingsIconFg }};
|
|
||||||
infoRoundedIconSignature: icon {{ "info/edit/channel_manage_signature", settingsIconFg }};
|
|
||||||
infoRoundedIconAntiSpam: icon {{ "info/edit/antispam", settingsIconFg }};
|
|
||||||
infoRoundedIconHideMembers: icon {{ "info/edit/hidden_members", settingsIconFg }};
|
|
||||||
|
|
||||||
infoIconShare: icon {{ "info/info_share", infoIconFg }};
|
infoIconShare: icon {{ "info/info_share", infoIconFg }};
|
||||||
infoIconEdit: icon {{ "info/info_edit", infoIconFg }};
|
infoIconEdit: icon {{ "info/info_edit", infoIconFg }};
|
||||||
infoIconDelete: icon {{ "info/info_delete", infoIconFg }};
|
infoIconDelete: icon {{ "info/info_delete", infoIconFg }};
|
||||||
|
@ -473,8 +464,10 @@ infoBlockButton: SettingsButton(infoProfileButton) {
|
||||||
textFg: attentionButtonFg;
|
textFg: attentionButtonFg;
|
||||||
textFgOver: attentionButtonFgOver;
|
textFgOver: attentionButtonFgOver;
|
||||||
}
|
}
|
||||||
infoCreateLinkedChatButton: SettingsButton(infoMainButton) {
|
infoCreateLinkedChatButton: SettingsButton(infoProfileButton) {
|
||||||
padding: margins(74px, 10px, 8px, 8px);
|
padding: margins(74px, 10px, 8px, 8px);
|
||||||
|
textFg: lightButtonFg;
|
||||||
|
textFgOver: lightButtonFgOver;
|
||||||
}
|
}
|
||||||
infoUnlinkChatButton: SettingsButton(infoCreateLinkedChatButton) {
|
infoUnlinkChatButton: SettingsButton(infoCreateLinkedChatButton) {
|
||||||
textFg: attentionButtonFg;
|
textFg: attentionButtonFg;
|
||||||
|
|
|
@ -549,15 +549,6 @@ OverlayWidget::OverlayWidget()
|
||||||
handleMouseRelease(mousePosition(e), mouseButton(e));
|
handleMouseRelease(mousePosition(e), mouseButton(e));
|
||||||
} else if (type == QEvent::MouseMove) {
|
} else if (type == QEvent::MouseMove) {
|
||||||
handleMouseMove(mousePosition(e));
|
handleMouseMove(mousePosition(e));
|
||||||
} else if (type == QEvent::ContextMenu) {
|
|
||||||
const auto event = static_cast<QContextMenuEvent*>(e.get());
|
|
||||||
const auto mouse = (event->reason() == QContextMenuEvent::Mouse);
|
|
||||||
const auto position = mouse
|
|
||||||
? std::make_optional(event->pos())
|
|
||||||
: std::nullopt;
|
|
||||||
if (handleContextMenu(position)) {
|
|
||||||
return base::EventFilterResult::Cancel;
|
|
||||||
}
|
|
||||||
} else if (type == QEvent::MouseButtonDblClick) {
|
} else if (type == QEvent::MouseButtonDblClick) {
|
||||||
if (handleDoubleClick(mousePosition(e), mouseButton(e))) {
|
if (handleDoubleClick(mousePosition(e), mouseButton(e))) {
|
||||||
return base::EventFilterResult::Cancel;
|
return base::EventFilterResult::Cancel;
|
||||||
|
|
|
@ -73,7 +73,7 @@ object_ptr<Ui::RpWidget> AntiSpamValidator::createButton() const {
|
||||||
rpl::single(QString()),
|
rpl::single(QString()),
|
||||||
[] {},
|
[] {},
|
||||||
st::manageGroupTopicsButton,
|
st::manageGroupTopicsButton,
|
||||||
{ &st::infoRoundedIconAntiSpam, Settings::kIconPurple }
|
{ &st::menuIconAntispam }
|
||||||
))->toggleOn(rpl::single(
|
))->toggleOn(rpl::single(
|
||||||
_channel->antiSpamMode()
|
_channel->antiSpamMode()
|
||||||
) | rpl::then(state->toggled.events()));
|
) | rpl::then(state->toggled.events()));
|
||||||
|
|
|
@ -24,6 +24,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "window/window_session_controller.h"
|
#include "window/window_session_controller.h"
|
||||||
#include "styles/style_boxes.h"
|
#include "styles/style_boxes.h"
|
||||||
#include "styles/style_layers.h"
|
#include "styles/style_layers.h"
|
||||||
|
#include "styles/style_menu_icons.h"
|
||||||
#include "styles/style_settings.h"
|
#include "styles/style_settings.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -133,7 +134,7 @@ void Manage::setupContent() {
|
||||||
content,
|
content,
|
||||||
tr::lng_settings_cloud_password_manage_password_change(),
|
tr::lng_settings_cloud_password_manage_password_change(),
|
||||||
st::settingsButton,
|
st::settingsButton,
|
||||||
{ &st::settingsIconKey, kIconLightBlue }
|
{ &st::menuIconPermissions }
|
||||||
)->setClickedCallback([=] {
|
)->setClickedCallback([=] {
|
||||||
showOtherAndRememberPassword(CloudPasswordInputId());
|
showOtherAndRememberPassword(CloudPasswordInputId());
|
||||||
});
|
});
|
||||||
|
@ -143,7 +144,7 @@ void Manage::setupContent() {
|
||||||
? tr::lng_settings_cloud_password_manage_email_change()
|
? tr::lng_settings_cloud_password_manage_email_change()
|
||||||
: tr::lng_settings_cloud_password_manage_email_new(),
|
: tr::lng_settings_cloud_password_manage_email_new(),
|
||||||
st::settingsButton,
|
st::settingsButton,
|
||||||
{ &st::settingsIconEmail, kIconLightOrange }
|
{ &st::menuIconRecoveryEmail }
|
||||||
)->setClickedCallback([=] {
|
)->setClickedCallback([=] {
|
||||||
auto data = stepData();
|
auto data = stepData();
|
||||||
data.setOnlyRecoveryEmail = true;
|
data.setOnlyRecoveryEmail = true;
|
||||||
|
|
|
@ -74,40 +74,10 @@ settingsUpdate: SettingsButton(infoMainButton, settingsButtonNoIcon) {
|
||||||
settingsUpdateStatePosition: point(22px, 29px);
|
settingsUpdateStatePosition: point(22px, 29px);
|
||||||
settingsDividerLabelPadding: margins(22px, 8px, 22px, 16px);
|
settingsDividerLabelPadding: margins(22px, 8px, 22px, 16px);
|
||||||
|
|
||||||
settingsIconAccount: icon {{ "settings/account", settingsIconFg }};
|
|
||||||
settingsIconNotifications: icon {{ "settings/notifications", settingsIconFg }};
|
|
||||||
settingsIconChat: icon {{ "settings/chat", settingsIconFg }};
|
settingsIconChat: icon {{ "settings/chat", settingsIconFg }};
|
||||||
settingsIconFolders: icon {{ "settings/folders", settingsIconFg }};
|
|
||||||
settingsIconGeneral: icon {{ "settings/advanced", settingsIconFg }};
|
|
||||||
settingsIconLock: icon {{ "settings/lock", settingsIconFg }};
|
|
||||||
settingsIconLanguage: icon {{ "settings/language", settingsIconFg }};
|
|
||||||
settingsIconBattery: icon {{ "settings/battery", settingsIconFg }};
|
|
||||||
settingsIconInterfaceScale: icon {{ "settings/interface_scale", settingsIconFg }};
|
settingsIconInterfaceScale: icon {{ "settings/interface_scale", settingsIconFg }};
|
||||||
settingsIconFaq: icon {{ "settings/faq", settingsIconFg }};
|
|
||||||
settingsIconCalls: icon {{ "settings/calls", settingsIconFg }};
|
|
||||||
settingsIconAskQuestion: icon {{ "settings/ask_question", settingsIconFg }};
|
|
||||||
settingsIconTips: icon {{ "settings/tips", settingsIconFg }};
|
|
||||||
settingsIconStickers: icon {{ "settings/stickers", settingsIconFg }};
|
settingsIconStickers: icon {{ "settings/stickers", settingsIconFg }};
|
||||||
settingsIconEmoji: icon {{ "settings/emoji", settingsIconFg }};
|
settingsIconEmoji: icon {{ "settings/emoji", settingsIconFg }};
|
||||||
settingsIconThemes: icon {{ "settings/palette", settingsIconFg }};
|
|
||||||
settingsIconGroup: icon {{ "settings/group", settingsIconFg }};
|
|
||||||
settingsIconChannel: icon {{ "settings/channel", settingsIconFg }};
|
|
||||||
settingsIconUser: icon {{ "settings/user", settingsIconFg }};
|
|
||||||
settingsIconKey: icon {{ "settings/key", settingsIconFg }};
|
|
||||||
settingsIconPlus: icon {{ "settings/plus", settingsIconFg }};
|
|
||||||
settingsIconMinus: icon {{ "settings/minus", settingsIconFg }};
|
|
||||||
settingsIconTimer: icon {{ "settings/timer", settingsIconFg }};
|
|
||||||
settingsIconLaptop: icon {{ "settings/laptop", settingsIconFg }};
|
|
||||||
settingsIconArrows: icon {{ "settings/arrows", settingsIconFg }};
|
|
||||||
settingsIconEmail: icon {{ "settings/email", settingsIconFg }};
|
|
||||||
settingsIconSound: icon {{ "settings/sound", settingsIconFg }};
|
|
||||||
settingsIconDock: icon {{ "settings/dock", settingsIconFg }};
|
|
||||||
settingsIconPin: icon {{ "settings/pin", settingsIconFg }};
|
|
||||||
settingsIconDownload: icon {{ "settings/download", settingsIconFg }};
|
|
||||||
settingsIconMention: icon {{ "settings/mention", settingsIconFg }};
|
|
||||||
settingsIconTopics: icon {{ "settings/topics", settingsIconFg }};
|
|
||||||
settingsIconTTL: icon {{ "settings/ttl", settingsIconFg }};
|
|
||||||
settingsIconPhoto: icon {{ "settings/photo", settingsIconFg }};
|
|
||||||
|
|
||||||
settingsPremiumIconStories: icon {{ "settings/stories", settingsIconFg }};
|
settingsPremiumIconStories: icon {{ "settings/stories", settingsIconFg }};
|
||||||
settingsPremiumIconChannelsOff: icon {{ "settings/premium/channels_off", settingsIconFg }};
|
settingsPremiumIconChannelsOff: icon {{ "settings/premium/channels_off", settingsIconFg }};
|
||||||
|
@ -127,7 +97,7 @@ settingsStoriesIconViews: icon {{ "menu/show_in_chat", premiumButtonBg1 }};
|
||||||
settingsStoriesIconExpiration: icon {{ "settings/premium/timer", premiumButtonBg1 }};
|
settingsStoriesIconExpiration: icon {{ "settings/premium/timer", premiumButtonBg1 }};
|
||||||
settingsStoriesIconDownload: icon {{ "menu/download", premiumButtonBg1 }};
|
settingsStoriesIconDownload: icon {{ "menu/download", premiumButtonBg1 }};
|
||||||
settingsStoriesIconCaption: icon {{ "settings/premium/stories_caption", premiumButtonBg1 }};
|
settingsStoriesIconCaption: icon {{ "settings/premium/stories_caption", premiumButtonBg1 }};
|
||||||
settingsStoriesIconLinks: icon {{ "settings/premium/stories_links", premiumButtonBg1 }};
|
settingsStoriesIconLinks: icon {{ "menu/links_profile", premiumButtonBg1 }};
|
||||||
|
|
||||||
settingsPremiumNewBadge: FlatLabel(defaultFlatLabel) {
|
settingsPremiumNewBadge: FlatLabel(defaultFlatLabel) {
|
||||||
style: TextStyle(semiboldTextStyle) {
|
style: TextStyle(semiboldTextStyle) {
|
||||||
|
|
|
@ -11,7 +11,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "apiwrap.h"
|
#include "apiwrap.h"
|
||||||
#include "settings/settings_common.h"
|
#include "settings/settings_common.h"
|
||||||
#include "settings/settings_chat.h"
|
#include "settings/settings_chat.h"
|
||||||
#include "settings/settings_experimental.h"
|
|
||||||
#include "settings/settings_power_saving.h"
|
#include "settings/settings_power_saving.h"
|
||||||
#include "settings/settings_privacy_security.h"
|
#include "settings/settings_privacy_security.h"
|
||||||
#include "ui/wrap/vertical_layout.h"
|
#include "ui/wrap/vertical_layout.h"
|
||||||
|
@ -46,8 +45,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "main/main_domain.h"
|
#include "main/main_domain.h"
|
||||||
#include "main/main_session.h"
|
#include "main/main_session.h"
|
||||||
#include "mtproto/facade.h"
|
#include "mtproto/facade.h"
|
||||||
#include "styles/style_settings.h"
|
|
||||||
#include "styles/style_layers.h"
|
#include "styles/style_layers.h"
|
||||||
|
#include "styles/style_menu_icons.h"
|
||||||
|
#include "styles/style_settings.h"
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
#include "base/platform/mac/base_confirm_quit.h"
|
#include "base/platform/mac/base_confirm_quit.h"
|
||||||
|
@ -96,7 +96,7 @@ void SetupConnectionType(
|
||||||
tr::lng_connection_auto_connecting() | rpl::to_empty
|
tr::lng_connection_auto_connecting() | rpl::to_empty
|
||||||
) | rpl::map(connectionType),
|
) | rpl::map(connectionType),
|
||||||
st::settingsButton,
|
st::settingsButton,
|
||||||
{ &st::settingsIconArrows, kIconGreen });
|
{ &st::menuIconNetwork });
|
||||||
button->addClickHandler([=] {
|
button->addClickHandler([=] {
|
||||||
controller->show(ProxiesBoxController::CreateOwningBox(account));
|
controller->show(ProxiesBoxController::CreateOwningBox(account));
|
||||||
});
|
});
|
||||||
|
@ -106,9 +106,7 @@ bool HasUpdate() {
|
||||||
return !Core::UpdaterDisabled();
|
return !Core::UpdaterDisabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetupUpdate(
|
void SetupUpdate(not_null<Ui::VerticalLayout*> container) {
|
||||||
not_null<Ui::VerticalLayout*> container,
|
|
||||||
Fn<void(Type)> showOther) {
|
|
||||||
if (!HasUpdate()) {
|
if (!HasUpdate()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -140,24 +138,6 @@ void SetupUpdate(
|
||||||
tr::lng_settings_install_beta(),
|
tr::lng_settings_install_beta(),
|
||||||
st::settingsButtonNoIcon).get();
|
st::settingsButtonNoIcon).get();
|
||||||
|
|
||||||
if (showOther) {
|
|
||||||
const auto experimental = inner->add(
|
|
||||||
object_ptr<Ui::SlideWrap<Button>>(
|
|
||||||
inner,
|
|
||||||
CreateButton(
|
|
||||||
inner,
|
|
||||||
tr::lng_settings_experimental(),
|
|
||||||
st::settingsButtonNoIcon)));
|
|
||||||
if (!install) {
|
|
||||||
experimental->toggle(true, anim::type::instant);
|
|
||||||
} else {
|
|
||||||
experimental->toggleOn(install->toggledValue());
|
|
||||||
}
|
|
||||||
experimental->entity()->setClickedCallback([=] {
|
|
||||||
showOther(Experimental::Id());
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
const auto check = AddButton(
|
const auto check = AddButton(
|
||||||
inner,
|
inner,
|
||||||
tr::lng_settings_check_now(),
|
tr::lng_settings_check_now(),
|
||||||
|
@ -996,9 +976,7 @@ void Advanced::setupContent(not_null<Window::SessionController*> controller) {
|
||||||
addDivider();
|
addDivider();
|
||||||
AddSkip(content);
|
AddSkip(content);
|
||||||
AddSubsectionTitle(content, tr::lng_settings_version_info());
|
AddSubsectionTitle(content, tr::lng_settings_version_info());
|
||||||
SetupUpdate(content, [=](Type type) {
|
SetupUpdate(content);
|
||||||
_showOther.fire_copy(type);
|
|
||||||
});
|
|
||||||
AddSkip(content);
|
AddSkip(content);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1029,24 +1007,13 @@ void Advanced::setupContent(not_null<Window::SessionController*> controller) {
|
||||||
if (cAutoUpdate()) {
|
if (cAutoUpdate()) {
|
||||||
addUpdate();
|
addUpdate();
|
||||||
}
|
}
|
||||||
if (!HasUpdate()) {
|
|
||||||
AddSkip(content);
|
|
||||||
AddDivider(content);
|
|
||||||
AddSkip(content);
|
|
||||||
content->add(
|
|
||||||
CreateButton(
|
|
||||||
content,
|
|
||||||
tr::lng_settings_experimental(),
|
|
||||||
st::settingsButtonNoIcon)
|
|
||||||
)->setClickedCallback([=] {
|
|
||||||
_showOther.fire_copy(Experimental::Id());
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
AddSkip(content);
|
AddSkip(content);
|
||||||
AddDivider(content);
|
AddDivider(content);
|
||||||
AddSkip(content);
|
AddSkip(content);
|
||||||
SetupExport(controller, content);
|
SetupExport(controller, content, [=](Type type) {
|
||||||
|
_showOther.fire_copy(type);
|
||||||
|
});
|
||||||
|
|
||||||
Ui::ResizeFitChild(this, content);
|
Ui::ResizeFitChild(this, content);
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,9 +30,7 @@ void SetupConnectionType(
|
||||||
not_null<::Main::Account*> account,
|
not_null<::Main::Account*> account,
|
||||||
not_null<Ui::VerticalLayout*> container);
|
not_null<Ui::VerticalLayout*> container);
|
||||||
bool HasUpdate();
|
bool HasUpdate();
|
||||||
void SetupUpdate(
|
void SetupUpdate(not_null<Ui::VerticalLayout*> container);
|
||||||
not_null<Ui::VerticalLayout*> container,
|
|
||||||
Fn<void(Type)> showOther);
|
|
||||||
void SetupWindowTitleContent(
|
void SetupWindowTitleContent(
|
||||||
Window::SessionController *controller,
|
Window::SessionController *controller,
|
||||||
not_null<Ui::VerticalLayout*> container);
|
not_null<Ui::VerticalLayout*> container);
|
||||||
|
|
|
@ -77,7 +77,7 @@ QPointer<Ui::RpWidget> Blocked::createPinnedToTop(not_null<QWidget*> parent) {
|
||||||
content,
|
content,
|
||||||
tr::lng_blocked_list_add(),
|
tr::lng_blocked_list_add(),
|
||||||
st::settingsButtonActive,
|
st::settingsButtonActive,
|
||||||
{ &st::menuIconBlockSettings, 0, IconType::Round, &st::transparent }
|
{ &st::menuIconBlockSettings, IconType::Round, &st::transparent }
|
||||||
)->addClickHandler([=] {
|
)->addClickHandler([=] {
|
||||||
BlockedBoxController::BlockNewPeer(_controller);
|
BlockedBoxController::BlockNewPeer(_controller);
|
||||||
});
|
});
|
||||||
|
|
|
@ -9,6 +9,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
|
|
||||||
#include "settings/settings_common.h"
|
#include "settings/settings_common.h"
|
||||||
#include "settings/settings_advanced.h"
|
#include "settings/settings_advanced.h"
|
||||||
|
#include "settings/settings_experimental.h"
|
||||||
#include "boxes/connection_box.h"
|
#include "boxes/connection_box.h"
|
||||||
#include "boxes/auto_download_box.h"
|
#include "boxes/auto_download_box.h"
|
||||||
#include "boxes/reactions_settings_box.h"
|
#include "boxes/reactions_settings_box.h"
|
||||||
|
@ -67,6 +68,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "styles/style_chat_helpers.h" // stickersRemove
|
#include "styles/style_chat_helpers.h" // stickersRemove
|
||||||
#include "styles/style_settings.h"
|
#include "styles/style_settings.h"
|
||||||
#include "styles/style_layers.h"
|
#include "styles/style_layers.h"
|
||||||
|
#include "styles/style_menu_icons.h"
|
||||||
#include "styles/style_window.h"
|
#include "styles/style_window.h"
|
||||||
|
|
||||||
namespace Settings {
|
namespace Settings {
|
||||||
|
@ -805,7 +807,7 @@ void SetupStickersEmoji(
|
||||||
container,
|
container,
|
||||||
tr::lng_stickers_you_have(),
|
tr::lng_stickers_you_have(),
|
||||||
st::settingsButton,
|
st::settingsButton,
|
||||||
{ &st::settingsIconStickers, kIconLightOrange }
|
{ &st::menuIconStickers }
|
||||||
)->addClickHandler([=] {
|
)->addClickHandler([=] {
|
||||||
controller->show(Box<StickersBox>(
|
controller->show(Box<StickersBox>(
|
||||||
controller->uiShow(),
|
controller->uiShow(),
|
||||||
|
@ -816,7 +818,7 @@ void SetupStickersEmoji(
|
||||||
container,
|
container,
|
||||||
tr::lng_emoji_manage_sets(),
|
tr::lng_emoji_manage_sets(),
|
||||||
st::settingsButton,
|
st::settingsButton,
|
||||||
{ &st::settingsIconEmoji, kIconDarkOrange }
|
{ &st::menuIconEmoji }
|
||||||
)->addClickHandler([=] {
|
)->addClickHandler([=] {
|
||||||
controller->show(Box<Ui::Emoji::ManageSetsBox>(session));
|
controller->show(Box<Ui::Emoji::ManageSetsBox>(session));
|
||||||
});
|
});
|
||||||
|
@ -1016,11 +1018,13 @@ void SetupMessages(
|
||||||
|
|
||||||
void SetupExport(
|
void SetupExport(
|
||||||
not_null<Window::SessionController*> controller,
|
not_null<Window::SessionController*> controller,
|
||||||
not_null<Ui::VerticalLayout*> container) {
|
not_null<Ui::VerticalLayout*> container,
|
||||||
|
Fn<void(Type)> showOther) {
|
||||||
AddButton(
|
AddButton(
|
||||||
container,
|
container,
|
||||||
tr::lng_settings_export_data(),
|
tr::lng_settings_export_data(),
|
||||||
st::settingsButtonNoIcon
|
st::settingsButton,
|
||||||
|
{ &st::menuIconExport }
|
||||||
)->addClickHandler([=] {
|
)->addClickHandler([=] {
|
||||||
const auto session = &controller->session();
|
const auto session = &controller->session();
|
||||||
controller->window().hideSettingsAndLayer();
|
controller->window().hideSettingsAndLayer();
|
||||||
|
@ -1029,6 +1033,15 @@ void SetupExport(
|
||||||
session,
|
session,
|
||||||
[=] { Core::App().exportManager().start(session); });
|
[=] { Core::App().exportManager().start(session); });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
AddButton(
|
||||||
|
container,
|
||||||
|
tr::lng_settings_experimental(),
|
||||||
|
st::settingsButton,
|
||||||
|
{ &st::menuIconExperimental }
|
||||||
|
)->addClickHandler([=] {
|
||||||
|
showOther(Experimental::Id());
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetupLocalStorage(
|
void SetupLocalStorage(
|
||||||
|
@ -1038,7 +1051,7 @@ void SetupLocalStorage(
|
||||||
container,
|
container,
|
||||||
tr::lng_settings_manage_local_storage(),
|
tr::lng_settings_manage_local_storage(),
|
||||||
st::settingsButton,
|
st::settingsButton,
|
||||||
{ &st::settingsIconGeneral, kIconLightOrange }
|
{ &st::menuIconStorage }
|
||||||
)->addClickHandler([=] {
|
)->addClickHandler([=] {
|
||||||
LocalStorageBox::Show(&controller->session());
|
LocalStorageBox::Show(&controller->session());
|
||||||
});
|
});
|
||||||
|
@ -1069,7 +1082,7 @@ void SetupDataStorage(
|
||||||
container,
|
container,
|
||||||
tr::lng_download_path(),
|
tr::lng_download_path(),
|
||||||
st::settingsButton,
|
st::settingsButton,
|
||||||
{ &st::settingsIconFolders, kIconLightBlue })));
|
{ &st::menuIconShowInFolder })));
|
||||||
auto pathtext = Core::App().settings().downloadPathValue(
|
auto pathtext = Core::App().settings().downloadPathValue(
|
||||||
) | rpl::map([](const QString &text) {
|
) | rpl::map([](const QString &text) {
|
||||||
if (text.isEmpty()) {
|
if (text.isEmpty()) {
|
||||||
|
@ -1097,7 +1110,7 @@ void SetupDataStorage(
|
||||||
container,
|
container,
|
||||||
tr::lng_downloads_section(),
|
tr::lng_downloads_section(),
|
||||||
st::settingsButton,
|
st::settingsButton,
|
||||||
{ &st::settingsIconDownload, kIconPurple }
|
{ &st::menuIconDownload }
|
||||||
)->setClickedCallback([=] {
|
)->setClickedCallback([=] {
|
||||||
controller->showSection(
|
controller->showSection(
|
||||||
Info::Downloads::Make(controller->session().user()));
|
Info::Downloads::Make(controller->session().user()));
|
||||||
|
@ -1155,15 +1168,15 @@ void SetupAutoDownload(
|
||||||
add(
|
add(
|
||||||
tr::lng_media_auto_in_private(),
|
tr::lng_media_auto_in_private(),
|
||||||
Source::User,
|
Source::User,
|
||||||
{ &st::settingsIconUser, kIconLightBlue });
|
{ &st::menuIconProfile });
|
||||||
add(
|
add(
|
||||||
tr::lng_media_auto_in_groups(),
|
tr::lng_media_auto_in_groups(),
|
||||||
Source::Group,
|
Source::Group,
|
||||||
{ &st::settingsIconGroup, kIconGreen });
|
{ &st::menuIconGroups });
|
||||||
add(
|
add(
|
||||||
tr::lng_media_auto_in_channels(),
|
tr::lng_media_auto_in_channels(),
|
||||||
Source::Channel,
|
Source::Channel,
|
||||||
{ &st::settingsIconChannel, kIconLightOrange });
|
{ &st::menuIconChannel });
|
||||||
|
|
||||||
AddSkip(container, st::settingsCheckboxesSkip);
|
AddSkip(container, st::settingsCheckboxesSkip);
|
||||||
}
|
}
|
||||||
|
@ -1507,7 +1520,7 @@ void SetupCloudThemes(
|
||||||
edit,
|
edit,
|
||||||
tr::lng_settings_bg_theme_edit(),
|
tr::lng_settings_bg_theme_edit(),
|
||||||
st::settingsButton,
|
st::settingsButton,
|
||||||
{ &st::settingsIconThemes, kIconGreen }
|
{ &st::menuIconPalette }
|
||||||
)->addClickHandler([=] {
|
)->addClickHandler([=] {
|
||||||
StartEditor(
|
StartEditor(
|
||||||
&controller->window(),
|
&controller->window(),
|
||||||
|
|
|
@ -29,7 +29,8 @@ void SetupSupport(
|
||||||
not_null<Ui::VerticalLayout*> container);
|
not_null<Ui::VerticalLayout*> container);
|
||||||
void SetupExport(
|
void SetupExport(
|
||||||
not_null<Window::SessionController*> controller,
|
not_null<Window::SessionController*> controller,
|
||||||
not_null<Ui::VerticalLayout*> container);
|
not_null<Ui::VerticalLayout*> container,
|
||||||
|
Fn<void(Type)> showOther);
|
||||||
|
|
||||||
void PaintRoundColorButton(
|
void PaintRoundColorButton(
|
||||||
QPainter &p,
|
QPainter &p,
|
||||||
|
|
|
@ -47,38 +47,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
|
|
||||||
namespace Settings {
|
namespace Settings {
|
||||||
namespace {
|
|
||||||
|
|
||||||
base::options::toggle OptionMonoSettingsIcons({
|
|
||||||
.id = kOptionMonoSettingsIcons,
|
|
||||||
.name = "Mono settings and menu icons",
|
|
||||||
.description = "Use a single color for settings and main menu icons.",
|
|
||||||
});
|
|
||||||
|
|
||||||
} // namespace
|
|
||||||
|
|
||||||
const char kOptionMonoSettingsIcons[] = "mono-settings-icons";
|
|
||||||
|
|
||||||
Icon::Icon(IconDescriptor descriptor) : _icon(descriptor.icon) {
|
Icon::Icon(IconDescriptor descriptor) : _icon(descriptor.icon) {
|
||||||
const auto background = [&]() -> const style::color* {
|
const auto background = [&]() -> const style::color* {
|
||||||
if (descriptor.type == IconType::Simple) {
|
if (descriptor.type == IconType::Simple) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
} else if (OptionMonoSettingsIcons.value()) {
|
|
||||||
return &st::transparent;
|
|
||||||
} else if (descriptor.color > 0) {
|
|
||||||
const auto list = std::array{
|
|
||||||
&st::settingsIconBg1,
|
|
||||||
&st::settingsIconBg2,
|
|
||||||
&st::settingsIconBg3,
|
|
||||||
&st::settingsIconBg4,
|
|
||||||
&st::settingsIconBg5,
|
|
||||||
&st::settingsIconBg6,
|
|
||||||
(const style::color*)nullptr,
|
|
||||||
&st::settingsIconBg8,
|
|
||||||
&st::settingsIconBgArchive,
|
|
||||||
};
|
|
||||||
Assert(descriptor.color < 10 && descriptor.color != 7);
|
|
||||||
return list[descriptor.color - 1];
|
|
||||||
}
|
}
|
||||||
return descriptor.background;
|
return descriptor.background;
|
||||||
}();
|
}();
|
||||||
|
@ -111,11 +84,7 @@ void Icon::paint(QPainter &p, int x, int y) const {
|
||||||
_backgroundBrush->first,
|
_backgroundBrush->first,
|
||||||
_backgroundBrush->first);
|
_backgroundBrush->first);
|
||||||
}
|
}
|
||||||
if (OptionMonoSettingsIcons.value()) {
|
_icon->paint(p, { x, y }, 2 * x + _icon->width());
|
||||||
_icon->paint(p, { x, y }, 2 * x + _icon->width(), st::menuIconFg->c);
|
|
||||||
} else {
|
|
||||||
_icon->paint(p, { x, y }, 2 * x + _icon->width());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int Icon::width() const {
|
int Icon::width() const {
|
||||||
|
|
|
@ -48,8 +48,6 @@ struct IconDescriptor;
|
||||||
|
|
||||||
namespace Settings {
|
namespace Settings {
|
||||||
|
|
||||||
extern const char kOptionMonoSettingsIcons[];
|
|
||||||
|
|
||||||
using Button = Ui::SettingsButton;
|
using Button = Ui::SettingsButton;
|
||||||
|
|
||||||
class AbstractSection;
|
class AbstractSection;
|
||||||
|
@ -129,15 +127,6 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
inline constexpr auto kIconRed = 1;
|
|
||||||
inline constexpr auto kIconGreen = 2;
|
|
||||||
inline constexpr auto kIconLightOrange = 3;
|
|
||||||
inline constexpr auto kIconLightBlue = 4;
|
|
||||||
inline constexpr auto kIconDarkBlue = 5;
|
|
||||||
inline constexpr auto kIconPurple = 6;
|
|
||||||
inline constexpr auto kIconDarkOrange = 8;
|
|
||||||
inline constexpr auto kIconGray = 9;
|
|
||||||
|
|
||||||
enum class IconType {
|
enum class IconType {
|
||||||
Rounded,
|
Rounded,
|
||||||
Round,
|
Round,
|
||||||
|
@ -146,10 +135,9 @@ enum class IconType {
|
||||||
|
|
||||||
struct IconDescriptor {
|
struct IconDescriptor {
|
||||||
const style::icon *icon = nullptr;
|
const style::icon *icon = nullptr;
|
||||||
int color = 0; // settingsIconBg{color}, 9 for settingsIconBgArchive.
|
|
||||||
IconType type = IconType::Rounded;
|
IconType type = IconType::Rounded;
|
||||||
const style::color *background = nullptr;
|
const style::color *background = nullptr;
|
||||||
std::optional<QBrush> backgroundBrush; // Can be useful for gragdients.
|
std::optional<QBrush> backgroundBrush; // Can be useful for gradients.
|
||||||
|
|
||||||
explicit operator bool() const {
|
explicit operator bool() const {
|
||||||
return (icon != nullptr);
|
return (icon != nullptr);
|
||||||
|
|
|
@ -26,7 +26,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "window/window_session_controller.h"
|
#include "window/window_session_controller.h"
|
||||||
#include "window/window_controller.h"
|
#include "window/window_controller.h"
|
||||||
#include "window/notifications_manager.h"
|
#include "window/notifications_manager.h"
|
||||||
#include "settings/settings_common.h"
|
|
||||||
#include "storage/localimageloader.h"
|
#include "storage/localimageloader.h"
|
||||||
#include "data/data_document_resolver.h"
|
#include "data/data_document_resolver.h"
|
||||||
#include "styles/style_settings.h"
|
#include "styles/style_settings.h"
|
||||||
|
@ -144,7 +143,6 @@ void SetupExperimental(
|
||||||
addToggle(Ui::kOptionUseSmallMsgBubbleRadius);
|
addToggle(Ui::kOptionUseSmallMsgBubbleRadius);
|
||||||
addToggle(Media::Player::kOptionDisableAutoplayNext);
|
addToggle(Media::Player::kOptionDisableAutoplayNext);
|
||||||
addToggle(kOptionSendLargePhotos);
|
addToggle(kOptionSendLargePhotos);
|
||||||
addToggle(Settings::kOptionMonoSettingsIcons);
|
|
||||||
addToggle(Webview::kOptionWebviewDebugEnabled);
|
addToggle(Webview::kOptionWebviewDebugEnabled);
|
||||||
addToggle(kOptionAutoScrollInactiveChat);
|
addToggle(kOptionAutoScrollInactiveChat);
|
||||||
addToggle(Window::Notifications::kOptionGNotification);
|
addToggle(Window::Notifications::kOptionGNotification);
|
||||||
|
|
|
@ -543,7 +543,7 @@ void FilterRowButton::paintEvent(QPaintEvent *e) {
|
||||||
container,
|
container,
|
||||||
tr::lng_filters_create(),
|
tr::lng_filters_create(),
|
||||||
st::settingsButtonActive,
|
st::settingsButtonActive,
|
||||||
{ &st::settingsIconAdd, 0, IconType::Round, &st::windowBgActive }
|
{ &st::settingsIconAdd, IconType::Round, &st::windowBgActive }
|
||||||
)->setClickedCallback([=] {
|
)->setClickedCallback([=] {
|
||||||
if (showLimitReached()) {
|
if (showLimitReached()) {
|
||||||
return;
|
return;
|
||||||
|
|