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_phone_label" = "Phone number";
|
||||
"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_advanced" = "Advanced";
|
||||
"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_data_storage" = "Data and storage";
|
||||
"lng_settings_information" = "Edit profile";
|
||||
"lng_settings_my_account" = "My Account";
|
||||
"lng_settings_security" = "Security";
|
||||
"lng_settings_passcode_title" = "Local passcode";
|
||||
"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_new_unknown" = "New chats from unknown users";
|
||||
"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_security_bots" = "Bots and websites";
|
||||
"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_title" = "Power Usage";
|
||||
|
|
|
@ -298,17 +298,11 @@ void EditPrivacyBox::setupContent() {
|
|||
CreateButton(
|
||||
content,
|
||||
rpl::duplicate(text),
|
||||
st::settingsButton,
|
||||
{
|
||||
(always
|
||||
? &st::settingsIconPlus
|
||||
: &st::settingsIconMinus),
|
||||
always ? kIconGreen : kIconRed,
|
||||
})));
|
||||
st::settingsButtonNoIcon)));
|
||||
CreateRightLabel(
|
||||
button->entity(),
|
||||
std::move(label),
|
||||
st::settingsButton,
|
||||
st::settingsButtonNoIcon,
|
||||
std::move(text));
|
||||
button->toggleOn(rpl::duplicate(
|
||||
optionValue
|
||||
|
@ -384,9 +378,9 @@ void EditPrivacyBox::setupContent() {
|
|||
});
|
||||
addButton(tr::lng_cancel(), [this] { closeBox(); });
|
||||
|
||||
const auto linkHeight = st::settingsButton.padding.top()
|
||||
+ st::settingsButton.height
|
||||
+ st::settingsButton.padding.bottom();
|
||||
const auto linkHeight = st::settingsButtonNoIcon.padding.top()
|
||||
+ st::settingsButtonNoIcon.height
|
||||
+ st::settingsButtonNoIcon.padding.bottom();
|
||||
|
||||
widthValue(
|
||||
) | rpl::start_with_next([=](int width) {
|
||||
|
|
|
@ -666,7 +666,7 @@ void EditFilterBox(
|
|||
content,
|
||||
tr::lng_filters_add_chats(),
|
||||
st::settingsButtonActive,
|
||||
{ &st::settingsIconAdd, 0, IconType::Round, &st::windowBgActive });
|
||||
{ &st::settingsIconAdd, IconType::Round, &st::windowBgActive });
|
||||
|
||||
const auto include = SetupChatsPreview(
|
||||
content,
|
||||
|
@ -693,7 +693,7 @@ void EditFilterBox(
|
|||
excludeInner,
|
||||
tr::lng_filters_remove_chats(),
|
||||
st::settingsButtonActive,
|
||||
{ &st::settingsIconRemove, 0, IconType::Round, &st::windowBgActive });
|
||||
{ &st::settingsIconRemove, IconType::Round, &st::windowBgActive });
|
||||
|
||||
const auto exclude = SetupChatsPreview(
|
||||
excludeInner,
|
||||
|
@ -746,13 +746,13 @@ void EditFilterBox(
|
|||
state->hasLinks.value() | rpl::map(!rpl::mappers::_1),
|
||||
tr::lng_filters_link_create(),
|
||||
st::settingsButtonActive,
|
||||
{ &st::settingsFolderShareIcon, 0, IconType::Simple });
|
||||
{ &st::settingsFolderShareIcon, IconType::Simple });
|
||||
const auto addLink = AddToggledButton(
|
||||
content,
|
||||
state->hasLinks.value(),
|
||||
tr::lng_group_invite_add(),
|
||||
st::settingsButtonActive,
|
||||
{ &st::settingsIconAdd, 0, IconType::Round, &st::windowBgActive });
|
||||
{ &st::settingsIconAdd, IconType::Round, &st::windowBgActive });
|
||||
|
||||
SetupFilterLinks(
|
||||
content,
|
||||
|
|
|
@ -23,6 +23,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "main/main_session.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "styles/style_layers.h"
|
||||
#include "styles/style_menu_icons.h"
|
||||
#include "styles/style_boxes.h"
|
||||
#include "styles/style_info.h"
|
||||
#include "styles/style_settings.h"
|
||||
|
@ -271,7 +272,7 @@ void Controller::choose(not_null<ChatData*> chat) {
|
|||
above,
|
||||
tr::lng_manage_discussion_group_create(),
|
||||
st::infoCreateLinkedChatButton,
|
||||
{ &st::settingsIconChat, Settings::kIconLightBlue }
|
||||
{ &st::menuIconGroupCreate }
|
||||
)->addClickHandler([=, parent = above.data()] {
|
||||
const auto guarded = crl::guard(parent, callback);
|
||||
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_linked_channel_unlink)(),
|
||||
st::infoUnlinkChatButton,
|
||||
{ &st::settingsIconMinus, Settings::kIconRed }
|
||||
{ &st::menuIconRemove }
|
||||
)->addClickHandler([=] { callback(nullptr); });
|
||||
Settings::AddSkip(below);
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "apiwrap.h"
|
||||
#include "lang/lang_keys.h"
|
||||
#include "styles/style_info.h"
|
||||
#include "styles/style_menu_icons.h"
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -53,7 +54,7 @@ namespace {
|
|||
rpl::single(QString()),
|
||||
[] {},
|
||||
st::manageGroupTopicsButton,
|
||||
{ &st::infoRoundedIconHideMembers, Settings::kIconDarkBlue }
|
||||
{ &st::menuIconHideMembers }
|
||||
))->toggleOn(rpl::single(
|
||||
(megagroup->flags() & ChannelDataFlag::ParticipantsHidden) != 0
|
||||
) | rpl::then(state->toggled.events()));
|
||||
|
|
|
@ -1684,7 +1684,7 @@ base::unique_qptr<Ui::PopupMenu> ParticipantsBoxController::rowContextMenu(
|
|||
result->addAction(
|
||||
tr::lng_context_restrict_user(tr::now),
|
||||
crl::guard(this, [=] { showRestricted(user); }),
|
||||
&st::menuIconRestrict);
|
||||
&st::menuIconPermissions);
|
||||
}
|
||||
}
|
||||
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 "api/api_invite_links.h"
|
||||
#include "styles/style_layers.h"
|
||||
#include "styles/style_menu_icons.h"
|
||||
#include "styles/style_boxes.h"
|
||||
#include "styles/style_info.h"
|
||||
#include "styles/style_settings.h"
|
||||
|
@ -307,11 +308,9 @@ private:
|
|||
void fillPendingRequestsButton();
|
||||
|
||||
void fillBotUsernamesButton();
|
||||
#if 0 // Enable after design improvements.
|
||||
void fillBotEditIntroButton();
|
||||
void fillBotEditCommandsButton();
|
||||
void fillBotEditSettingsButton();
|
||||
#endif
|
||||
|
||||
void submitTitle();
|
||||
void submitDescription();
|
||||
|
@ -348,9 +347,7 @@ private:
|
|||
void continueSave();
|
||||
void cancelSave();
|
||||
|
||||
#if 0 // Enable after design improvements.
|
||||
void toggleBotManager(const QString &command);
|
||||
#endif
|
||||
|
||||
void togglePreHistoryHidden(
|
||||
not_null<ChannelData*> channel,
|
||||
|
@ -605,7 +602,7 @@ object_ptr<Ui::RpWidget> Controller::createStickersEdit() {
|
|||
controller->show(
|
||||
Box<StickersBox>(controller->uiShow(), channel));
|
||||
},
|
||||
{ &st::settingsIconStickers, Settings::kIconLightOrange });
|
||||
{ &st::menuIconStickers });
|
||||
|
||||
Settings::AddSkip(container, bottomSkip);
|
||||
|
||||
|
@ -770,9 +767,6 @@ void Controller::fillPrivacyTypeButton() {
|
|||
&& _peer->asChannel()->requestToJoin()),
|
||||
};
|
||||
const auto isGroup = (_peer->isChat() || _peer->isMegagroup());
|
||||
const auto icon = isGroup
|
||||
? &st::settingsIconGroup
|
||||
: &st::settingsIconChannel;
|
||||
AddButtonWithText(
|
||||
_controls.buttonsLayout,
|
||||
(hasLocation
|
||||
|
@ -798,7 +792,7 @@ void Controller::fillPrivacyTypeButton() {
|
|||
: tr::lng_manage_private_peer_title)();
|
||||
}) | rpl::flatten_latest(),
|
||||
[=] { showEditPeerTypeBox(); },
|
||||
{ icon, Settings::kIconLightBlue });
|
||||
{ &st::menuIconCustomize });
|
||||
|
||||
_privacyTypeUpdates.fire_copy(_typeDataSavedValue->privacy);
|
||||
}
|
||||
|
@ -839,7 +833,7 @@ void Controller::fillLinkedChatButton() {
|
|||
std::move(text),
|
||||
std::move(label),
|
||||
[=] { showEditLinkedChatBox(); },
|
||||
{ &st::settingsIconChat, Settings::kIconGreen });
|
||||
{ isGroup ? &st::menuIconChannel : &st::menuIconGroups });
|
||||
_linkedChatUpdates.fire_copy(*_linkedChatSavedValue);
|
||||
}
|
||||
//
|
||||
|
@ -867,7 +861,7 @@ void Controller::fillForumButton() {
|
|||
rpl::single(QString()),
|
||||
[] {},
|
||||
st::manageGroupTopicsButton,
|
||||
{ &st::settingsIconTopics, Settings::kIconPurple }));
|
||||
{ &st::menuIconTopics }));
|
||||
const auto unlocks = std::make_shared<rpl::event_stream<bool>>();
|
||||
button->toggleOn(
|
||||
rpl::single(_peer->isForum()) | rpl::then(unlocks->events())
|
||||
|
@ -924,7 +918,7 @@ void Controller::fillSignaturesButton() {
|
|||
tr::lng_edit_sign_messages(),
|
||||
rpl::single(QString()),
|
||||
[] {},
|
||||
{ &st::infoRoundedIconSignature, Settings::kIconLightBlue }
|
||||
{ &st::menuIconSigned }
|
||||
)->toggleOn(rpl::single(channel->addsSignature())
|
||||
)->toggledValue(
|
||||
) | rpl::start_with_next([=](bool toggled) {
|
||||
|
@ -986,7 +980,7 @@ void Controller::fillHistoryVisibilityButton() {
|
|||
: tr::lng_manage_history_visibility_hidden)();
|
||||
}) | rpl::flatten_latest(),
|
||||
buttonCallback,
|
||||
{ &st::settingsIconChat, Settings::kIconGreen });
|
||||
{ &st::menuIconChatBubble });
|
||||
|
||||
updateHistoryVisibility->fire_copy(*_historyVisibilitySavedValue);
|
||||
|
||||
|
@ -1001,11 +995,9 @@ void Controller::fillManageSection() {
|
|||
|
||||
AddSkip(container, 0);
|
||||
fillBotUsernamesButton();
|
||||
#if 0 // Enable after design improvements.
|
||||
fillBotEditIntroButton();
|
||||
fillBotEditCommandsButton();
|
||||
fillBotEditSettingsButton();
|
||||
#endif
|
||||
Settings::AddSkip(
|
||||
container,
|
||||
st::editPeerTopButtonsLayoutSkipCustomBottom);
|
||||
|
@ -1174,7 +1166,7 @@ void Controller::fillManageSection() {
|
|||
Data::PeerAllowedReactions(_peer),
|
||||
done));
|
||||
},
|
||||
{ &st::infoRoundedIconReactions, Settings::kIconRed });
|
||||
{ &st::menuIconGroupReactions });
|
||||
}
|
||||
if (canEditPermissions) {
|
||||
AddButtonWithCount(
|
||||
|
@ -1193,7 +1185,7 @@ void Controller::fillManageSection() {
|
|||
});
|
||||
}) | rpl::flatten_latest(),
|
||||
[=] { ShowEditPermissions(_navigation, _peer); },
|
||||
{ &st::settingsIconKey, Settings::kIconGreen });
|
||||
{ &st::menuIconPermissions });
|
||||
}
|
||||
if (canEditInviteLinks) {
|
||||
auto count = Info::Profile::MigratedOrMeValue(
|
||||
|
@ -1227,7 +1219,7 @@ void Controller::fillManageSection() {
|
|||
0,
|
||||
0));
|
||||
},
|
||||
{ &st::infoRoundedIconInviteLinks, Settings::kIconLightOrange });
|
||||
{ &st::menuIconLinks });
|
||||
wrap->toggle(true, anim::type::instant);
|
||||
}
|
||||
if (canViewAdmins) {
|
||||
|
@ -1246,7 +1238,7 @@ void Controller::fillManageSection() {
|
|||
_peer,
|
||||
ParticipantsBoxController::Role::Admins);
|
||||
},
|
||||
{ &st::infoRoundedIconAdministrators, Settings::kIconLightBlue });
|
||||
{ &st::menuIconAdmin });
|
||||
}
|
||||
if (canViewMembers) {
|
||||
AddButtonWithCount(
|
||||
|
@ -1266,7 +1258,7 @@ void Controller::fillManageSection() {
|
|||
_peer,
|
||||
ParticipantsBoxController::Role::Members);
|
||||
},
|
||||
{ &st::settingsIconGroup, Settings::kIconDarkBlue });
|
||||
{ &st::menuIconGroups });
|
||||
}
|
||||
|
||||
fillPendingRequestsButton();
|
||||
|
@ -1283,7 +1275,7 @@ void Controller::fillManageSection() {
|
|||
_peer,
|
||||
ParticipantsBoxController::Role::Kicked);
|
||||
},
|
||||
{ &st::settingsIconMinus, Settings::kIconRed });
|
||||
{ &st::menuIconRemove });
|
||||
}
|
||||
if (hasRecentActions) {
|
||||
auto callback = [=] {
|
||||
|
@ -1295,7 +1287,7 @@ void Controller::fillManageSection() {
|
|||
tr::lng_manage_peer_recent_actions(),
|
||||
rpl::single(QString()), //Empty count.
|
||||
std::move(callback),
|
||||
{ &st::infoRoundedIconRecentActions, Settings::kIconPurple });
|
||||
{ &st::menuIconGroupLog });
|
||||
}
|
||||
|
||||
if (canEditStickers || canDeleteChannel) {
|
||||
|
@ -1337,7 +1329,7 @@ void Controller::fillPendingRequestsButton() {
|
|||
: tr::lng_manage_peer_requests_channel()),
|
||||
rpl::duplicate(pendingRequestsCount) | ToPositiveNumberString(),
|
||||
[=] { RequestsBoxController::Start(_navigation, _peer); },
|
||||
{ &st::infoRoundedIconRequests, Settings::kIconRed });
|
||||
{ &st::menuIconInvite });
|
||||
std::move(
|
||||
pendingRequestsCount
|
||||
) | rpl::start_with_next([=](int count) {
|
||||
|
@ -1396,10 +1388,9 @@ void Controller::fillBotUsernamesButton() {
|
|||
[=] {
|
||||
_navigation->uiShow()->showBox(Box(UsernamesBox, user));
|
||||
},
|
||||
{ &st::infoRoundedIconInviteLinks, Settings::kIconLightOrange });
|
||||
{ &st::menuIconLinks });
|
||||
}
|
||||
|
||||
#if 0 // Enable after design improvements.
|
||||
void Controller::fillBotEditIntroButton() {
|
||||
Expects(_isBot);
|
||||
|
||||
|
@ -1409,7 +1400,7 @@ void Controller::fillBotEditIntroButton() {
|
|||
tr::lng_manage_peer_bot_edit_intro(),
|
||||
rpl::never<QString>(),
|
||||
[=] { toggleBotManager(u"%1-intro"_q.arg(user->username())); },
|
||||
{ &st::settingsIconChat, Settings::kIconLightBlue });
|
||||
{ &st::menuIconEdit });
|
||||
}
|
||||
|
||||
void Controller::fillBotEditCommandsButton() {
|
||||
|
@ -1421,7 +1412,7 @@ void Controller::fillBotEditCommandsButton() {
|
|||
tr::lng_manage_peer_bot_edit_commands(),
|
||||
rpl::never<QString>(),
|
||||
[=] { toggleBotManager(u"%1-commands"_q.arg(user->username())); },
|
||||
{ &st::settingsIconChat, Settings::kIconLightBlue });
|
||||
{ &st::menuIconBotCommands });
|
||||
}
|
||||
|
||||
void Controller::fillBotEditSettingsButton() {
|
||||
|
@ -1433,9 +1424,8 @@ void Controller::fillBotEditSettingsButton() {
|
|||
tr::lng_manage_peer_bot_edit_settings(),
|
||||
rpl::never<QString>(),
|
||||
[=] { toggleBotManager(user->username()); },
|
||||
{ &st::settingsIconChat, Settings::kIconLightBlue });
|
||||
{ &st::menuIconSettings });
|
||||
}
|
||||
#endif
|
||||
|
||||
void Controller::submitTitle() {
|
||||
Expects(_controls.title != nullptr);
|
||||
|
@ -1910,7 +1900,6 @@ void Controller::saveHistoryVisibility() {
|
|||
[=] { cancelSave(); });
|
||||
}
|
||||
|
||||
#if 0 // Enable after design improvements.
|
||||
void Controller::toggleBotManager(const QString &command) {
|
||||
const auto controller = _navigation->parentController();
|
||||
_api.request(MTPcontacts_ResolveUsername(
|
||||
|
@ -1926,7 +1915,6 @@ void Controller::toggleBotManager(const QString &command) {
|
|||
}
|
||||
}).send();
|
||||
}
|
||||
#endif
|
||||
|
||||
void Controller::togglePreHistoryHidden(
|
||||
not_null<ChannelData*> channel,
|
||||
|
|
|
@ -35,6 +35,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "styles/style_layers.h"
|
||||
#include "styles/style_boxes.h"
|
||||
#include "styles/style_info.h"
|
||||
#include "styles/style_menu_icons.h"
|
||||
#include "styles/style_window.h"
|
||||
#include "styles/style_settings.h"
|
||||
|
||||
|
@ -818,7 +819,7 @@ void AddSuggestGigagroup(
|
|||
rpl::single(QString()),
|
||||
std::move(callback),
|
||||
st::manageGroupTopicsButton,
|
||||
{ &st::settingsIconAskQuestion, Settings::kIconGreen }));
|
||||
{ &st::menuIconChatDiscuss }));
|
||||
|
||||
container->add(
|
||||
object_ptr<Ui::DividerLabel>(
|
||||
|
@ -854,7 +855,7 @@ void AddBannedButtons(
|
|||
ParticipantsBoxController::Role::Restricted);
|
||||
},
|
||||
st::manageGroupTopicsButton,
|
||||
{ &st::settingsIconKey, Settings::kIconLightOrange }));
|
||||
{ &st::menuIconPermissions }));
|
||||
if (channel) {
|
||||
container->add(EditPeerInfoBox::CreateButton(
|
||||
container,
|
||||
|
@ -868,7 +869,7 @@ void AddBannedButtons(
|
|||
ParticipantsBoxController::Role::Kicked);
|
||||
},
|
||||
st::manageGroupTopicsButton,
|
||||
{ &st::settingsIconMinus, Settings::kIconRed }));
|
||||
{ &st::menuIconRemove }));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -278,7 +278,6 @@ void RingtonesBox(
|
|||
st::ringtonesBoxButton,
|
||||
{
|
||||
&st::settingsIconAdd,
|
||||
0,
|
||||
Settings::IconType::Round,
|
||||
&st::windowBgActive
|
||||
}),
|
||||
|
|
|
@ -1468,7 +1468,7 @@ void InnerWidget::suggestRestrictParticipant(
|
|||
editRestrictions(false, ChatRestrictionsInfo());
|
||||
}).send();
|
||||
}
|
||||
}, &st::menuIconRestrict);
|
||||
}, &st::menuIconPermissions);
|
||||
}
|
||||
|
||||
void InnerWidget::restrictParticipant(
|
||||
|
|
|
@ -1199,7 +1199,7 @@ void AddPollActions(
|
|||
.confirmText = tr::lng_polls_stop_sure(),
|
||||
.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 }};
|
||||
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 }};
|
||||
infoIconEdit: icon {{ "info/info_edit", infoIconFg }};
|
||||
infoIconDelete: icon {{ "info/info_delete", infoIconFg }};
|
||||
|
@ -473,8 +464,10 @@ infoBlockButton: SettingsButton(infoProfileButton) {
|
|||
textFg: attentionButtonFg;
|
||||
textFgOver: attentionButtonFgOver;
|
||||
}
|
||||
infoCreateLinkedChatButton: SettingsButton(infoMainButton) {
|
||||
infoCreateLinkedChatButton: SettingsButton(infoProfileButton) {
|
||||
padding: margins(74px, 10px, 8px, 8px);
|
||||
textFg: lightButtonFg;
|
||||
textFgOver: lightButtonFgOver;
|
||||
}
|
||||
infoUnlinkChatButton: SettingsButton(infoCreateLinkedChatButton) {
|
||||
textFg: attentionButtonFg;
|
||||
|
|
|
@ -549,15 +549,6 @@ OverlayWidget::OverlayWidget()
|
|||
handleMouseRelease(mousePosition(e), mouseButton(e));
|
||||
} else if (type == QEvent::MouseMove) {
|
||||
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) {
|
||||
if (handleDoubleClick(mousePosition(e), mouseButton(e))) {
|
||||
return base::EventFilterResult::Cancel;
|
||||
|
|
|
@ -73,7 +73,7 @@ object_ptr<Ui::RpWidget> AntiSpamValidator::createButton() const {
|
|||
rpl::single(QString()),
|
||||
[] {},
|
||||
st::manageGroupTopicsButton,
|
||||
{ &st::infoRoundedIconAntiSpam, Settings::kIconPurple }
|
||||
{ &st::menuIconAntispam }
|
||||
))->toggleOn(rpl::single(
|
||||
_channel->antiSpamMode()
|
||||
) | rpl::then(state->toggled.events()));
|
||||
|
|
|
@ -24,6 +24,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "window/window_session_controller.h"
|
||||
#include "styles/style_boxes.h"
|
||||
#include "styles/style_layers.h"
|
||||
#include "styles/style_menu_icons.h"
|
||||
#include "styles/style_settings.h"
|
||||
|
||||
/*
|
||||
|
@ -133,7 +134,7 @@ void Manage::setupContent() {
|
|||
content,
|
||||
tr::lng_settings_cloud_password_manage_password_change(),
|
||||
st::settingsButton,
|
||||
{ &st::settingsIconKey, kIconLightBlue }
|
||||
{ &st::menuIconPermissions }
|
||||
)->setClickedCallback([=] {
|
||||
showOtherAndRememberPassword(CloudPasswordInputId());
|
||||
});
|
||||
|
@ -143,7 +144,7 @@ void Manage::setupContent() {
|
|||
? tr::lng_settings_cloud_password_manage_email_change()
|
||||
: tr::lng_settings_cloud_password_manage_email_new(),
|
||||
st::settingsButton,
|
||||
{ &st::settingsIconEmail, kIconLightOrange }
|
||||
{ &st::menuIconRecoveryEmail }
|
||||
)->setClickedCallback([=] {
|
||||
auto data = stepData();
|
||||
data.setOnlyRecoveryEmail = true;
|
||||
|
|
|
@ -74,40 +74,10 @@ settingsUpdate: SettingsButton(infoMainButton, settingsButtonNoIcon) {
|
|||
settingsUpdateStatePosition: point(22px, 29px);
|
||||
settingsDividerLabelPadding: margins(22px, 8px, 22px, 16px);
|
||||
|
||||
settingsIconAccount: icon {{ "settings/account", settingsIconFg }};
|
||||
settingsIconNotifications: icon {{ "settings/notifications", 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 }};
|
||||
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 }};
|
||||
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 }};
|
||||
settingsPremiumIconChannelsOff: icon {{ "settings/premium/channels_off", settingsIconFg }};
|
||||
|
@ -127,7 +97,7 @@ settingsStoriesIconViews: icon {{ "menu/show_in_chat", premiumButtonBg1 }};
|
|||
settingsStoriesIconExpiration: icon {{ "settings/premium/timer", premiumButtonBg1 }};
|
||||
settingsStoriesIconDownload: icon {{ "menu/download", premiumButtonBg1 }};
|
||||
settingsStoriesIconCaption: icon {{ "settings/premium/stories_caption", premiumButtonBg1 }};
|
||||
settingsStoriesIconLinks: icon {{ "settings/premium/stories_links", premiumButtonBg1 }};
|
||||
settingsStoriesIconLinks: icon {{ "menu/links_profile", premiumButtonBg1 }};
|
||||
|
||||
settingsPremiumNewBadge: FlatLabel(defaultFlatLabel) {
|
||||
style: TextStyle(semiboldTextStyle) {
|
||||
|
|
|
@ -11,7 +11,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "apiwrap.h"
|
||||
#include "settings/settings_common.h"
|
||||
#include "settings/settings_chat.h"
|
||||
#include "settings/settings_experimental.h"
|
||||
#include "settings/settings_power_saving.h"
|
||||
#include "settings/settings_privacy_security.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_session.h"
|
||||
#include "mtproto/facade.h"
|
||||
#include "styles/style_settings.h"
|
||||
#include "styles/style_layers.h"
|
||||
#include "styles/style_menu_icons.h"
|
||||
#include "styles/style_settings.h"
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
#include "base/platform/mac/base_confirm_quit.h"
|
||||
|
@ -96,7 +96,7 @@ void SetupConnectionType(
|
|||
tr::lng_connection_auto_connecting() | rpl::to_empty
|
||||
) | rpl::map(connectionType),
|
||||
st::settingsButton,
|
||||
{ &st::settingsIconArrows, kIconGreen });
|
||||
{ &st::menuIconNetwork });
|
||||
button->addClickHandler([=] {
|
||||
controller->show(ProxiesBoxController::CreateOwningBox(account));
|
||||
});
|
||||
|
@ -106,9 +106,7 @@ bool HasUpdate() {
|
|||
return !Core::UpdaterDisabled();
|
||||
}
|
||||
|
||||
void SetupUpdate(
|
||||
not_null<Ui::VerticalLayout*> container,
|
||||
Fn<void(Type)> showOther) {
|
||||
void SetupUpdate(not_null<Ui::VerticalLayout*> container) {
|
||||
if (!HasUpdate()) {
|
||||
return;
|
||||
}
|
||||
|
@ -140,24 +138,6 @@ void SetupUpdate(
|
|||
tr::lng_settings_install_beta(),
|
||||
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(
|
||||
inner,
|
||||
tr::lng_settings_check_now(),
|
||||
|
@ -996,9 +976,7 @@ void Advanced::setupContent(not_null<Window::SessionController*> controller) {
|
|||
addDivider();
|
||||
AddSkip(content);
|
||||
AddSubsectionTitle(content, tr::lng_settings_version_info());
|
||||
SetupUpdate(content, [=](Type type) {
|
||||
_showOther.fire_copy(type);
|
||||
});
|
||||
SetupUpdate(content);
|
||||
AddSkip(content);
|
||||
}
|
||||
};
|
||||
|
@ -1029,24 +1007,13 @@ void Advanced::setupContent(not_null<Window::SessionController*> controller) {
|
|||
if (cAutoUpdate()) {
|
||||
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);
|
||||
AddDivider(content);
|
||||
AddSkip(content);
|
||||
SetupExport(controller, content);
|
||||
SetupExport(controller, content, [=](Type type) {
|
||||
_showOther.fire_copy(type);
|
||||
});
|
||||
|
||||
Ui::ResizeFitChild(this, content);
|
||||
}
|
||||
|
|
|
@ -30,9 +30,7 @@ void SetupConnectionType(
|
|||
not_null<::Main::Account*> account,
|
||||
not_null<Ui::VerticalLayout*> container);
|
||||
bool HasUpdate();
|
||||
void SetupUpdate(
|
||||
not_null<Ui::VerticalLayout*> container,
|
||||
Fn<void(Type)> showOther);
|
||||
void SetupUpdate(not_null<Ui::VerticalLayout*> container);
|
||||
void SetupWindowTitleContent(
|
||||
Window::SessionController *controller,
|
||||
not_null<Ui::VerticalLayout*> container);
|
||||
|
|
|
@ -77,7 +77,7 @@ QPointer<Ui::RpWidget> Blocked::createPinnedToTop(not_null<QWidget*> parent) {
|
|||
content,
|
||||
tr::lng_blocked_list_add(),
|
||||
st::settingsButtonActive,
|
||||
{ &st::menuIconBlockSettings, 0, IconType::Round, &st::transparent }
|
||||
{ &st::menuIconBlockSettings, IconType::Round, &st::transparent }
|
||||
)->addClickHandler([=] {
|
||||
BlockedBoxController::BlockNewPeer(_controller);
|
||||
});
|
||||
|
|
|
@ -9,6 +9,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
|
||||
#include "settings/settings_common.h"
|
||||
#include "settings/settings_advanced.h"
|
||||
#include "settings/settings_experimental.h"
|
||||
#include "boxes/connection_box.h"
|
||||
#include "boxes/auto_download_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_settings.h"
|
||||
#include "styles/style_layers.h"
|
||||
#include "styles/style_menu_icons.h"
|
||||
#include "styles/style_window.h"
|
||||
|
||||
namespace Settings {
|
||||
|
@ -805,7 +807,7 @@ void SetupStickersEmoji(
|
|||
container,
|
||||
tr::lng_stickers_you_have(),
|
||||
st::settingsButton,
|
||||
{ &st::settingsIconStickers, kIconLightOrange }
|
||||
{ &st::menuIconStickers }
|
||||
)->addClickHandler([=] {
|
||||
controller->show(Box<StickersBox>(
|
||||
controller->uiShow(),
|
||||
|
@ -816,7 +818,7 @@ void SetupStickersEmoji(
|
|||
container,
|
||||
tr::lng_emoji_manage_sets(),
|
||||
st::settingsButton,
|
||||
{ &st::settingsIconEmoji, kIconDarkOrange }
|
||||
{ &st::menuIconEmoji }
|
||||
)->addClickHandler([=] {
|
||||
controller->show(Box<Ui::Emoji::ManageSetsBox>(session));
|
||||
});
|
||||
|
@ -1016,11 +1018,13 @@ void SetupMessages(
|
|||
|
||||
void SetupExport(
|
||||
not_null<Window::SessionController*> controller,
|
||||
not_null<Ui::VerticalLayout*> container) {
|
||||
not_null<Ui::VerticalLayout*> container,
|
||||
Fn<void(Type)> showOther) {
|
||||
AddButton(
|
||||
container,
|
||||
tr::lng_settings_export_data(),
|
||||
st::settingsButtonNoIcon
|
||||
st::settingsButton,
|
||||
{ &st::menuIconExport }
|
||||
)->addClickHandler([=] {
|
||||
const auto session = &controller->session();
|
||||
controller->window().hideSettingsAndLayer();
|
||||
|
@ -1029,6 +1033,15 @@ void SetupExport(
|
|||
session,
|
||||
[=] { Core::App().exportManager().start(session); });
|
||||
});
|
||||
|
||||
AddButton(
|
||||
container,
|
||||
tr::lng_settings_experimental(),
|
||||
st::settingsButton,
|
||||
{ &st::menuIconExperimental }
|
||||
)->addClickHandler([=] {
|
||||
showOther(Experimental::Id());
|
||||
});
|
||||
}
|
||||
|
||||
void SetupLocalStorage(
|
||||
|
@ -1038,7 +1051,7 @@ void SetupLocalStorage(
|
|||
container,
|
||||
tr::lng_settings_manage_local_storage(),
|
||||
st::settingsButton,
|
||||
{ &st::settingsIconGeneral, kIconLightOrange }
|
||||
{ &st::menuIconStorage }
|
||||
)->addClickHandler([=] {
|
||||
LocalStorageBox::Show(&controller->session());
|
||||
});
|
||||
|
@ -1069,7 +1082,7 @@ void SetupDataStorage(
|
|||
container,
|
||||
tr::lng_download_path(),
|
||||
st::settingsButton,
|
||||
{ &st::settingsIconFolders, kIconLightBlue })));
|
||||
{ &st::menuIconShowInFolder })));
|
||||
auto pathtext = Core::App().settings().downloadPathValue(
|
||||
) | rpl::map([](const QString &text) {
|
||||
if (text.isEmpty()) {
|
||||
|
@ -1097,7 +1110,7 @@ void SetupDataStorage(
|
|||
container,
|
||||
tr::lng_downloads_section(),
|
||||
st::settingsButton,
|
||||
{ &st::settingsIconDownload, kIconPurple }
|
||||
{ &st::menuIconDownload }
|
||||
)->setClickedCallback([=] {
|
||||
controller->showSection(
|
||||
Info::Downloads::Make(controller->session().user()));
|
||||
|
@ -1155,15 +1168,15 @@ void SetupAutoDownload(
|
|||
add(
|
||||
tr::lng_media_auto_in_private(),
|
||||
Source::User,
|
||||
{ &st::settingsIconUser, kIconLightBlue });
|
||||
{ &st::menuIconProfile });
|
||||
add(
|
||||
tr::lng_media_auto_in_groups(),
|
||||
Source::Group,
|
||||
{ &st::settingsIconGroup, kIconGreen });
|
||||
{ &st::menuIconGroups });
|
||||
add(
|
||||
tr::lng_media_auto_in_channels(),
|
||||
Source::Channel,
|
||||
{ &st::settingsIconChannel, kIconLightOrange });
|
||||
{ &st::menuIconChannel });
|
||||
|
||||
AddSkip(container, st::settingsCheckboxesSkip);
|
||||
}
|
||||
|
@ -1507,7 +1520,7 @@ void SetupCloudThemes(
|
|||
edit,
|
||||
tr::lng_settings_bg_theme_edit(),
|
||||
st::settingsButton,
|
||||
{ &st::settingsIconThemes, kIconGreen }
|
||||
{ &st::menuIconPalette }
|
||||
)->addClickHandler([=] {
|
||||
StartEditor(
|
||||
&controller->window(),
|
||||
|
|
|
@ -29,7 +29,8 @@ void SetupSupport(
|
|||
not_null<Ui::VerticalLayout*> container);
|
||||
void SetupExport(
|
||||
not_null<Window::SessionController*> controller,
|
||||
not_null<Ui::VerticalLayout*> container);
|
||||
not_null<Ui::VerticalLayout*> container,
|
||||
Fn<void(Type)> showOther);
|
||||
|
||||
void PaintRoundColorButton(
|
||||
QPainter &p,
|
||||
|
|
|
@ -47,38 +47,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include <QAction>
|
||||
|
||||
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) {
|
||||
const auto background = [&]() -> const style::color* {
|
||||
if (descriptor.type == IconType::Simple) {
|
||||
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;
|
||||
}();
|
||||
|
@ -111,11 +84,7 @@ void Icon::paint(QPainter &p, int x, int y) const {
|
|||
_backgroundBrush->first,
|
||||
_backgroundBrush->first);
|
||||
}
|
||||
if (OptionMonoSettingsIcons.value()) {
|
||||
_icon->paint(p, { x, y }, 2 * x + _icon->width(), st::menuIconFg->c);
|
||||
} else {
|
||||
_icon->paint(p, { x, y }, 2 * x + _icon->width());
|
||||
}
|
||||
_icon->paint(p, { x, y }, 2 * x + _icon->width());
|
||||
}
|
||||
|
||||
int Icon::width() const {
|
||||
|
|
|
@ -48,8 +48,6 @@ struct IconDescriptor;
|
|||
|
||||
namespace Settings {
|
||||
|
||||
extern const char kOptionMonoSettingsIcons[];
|
||||
|
||||
using Button = Ui::SettingsButton;
|
||||
|
||||
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 {
|
||||
Rounded,
|
||||
Round,
|
||||
|
@ -146,10 +135,9 @@ enum class IconType {
|
|||
|
||||
struct IconDescriptor {
|
||||
const style::icon *icon = nullptr;
|
||||
int color = 0; // settingsIconBg{color}, 9 for settingsIconBgArchive.
|
||||
IconType type = IconType::Rounded;
|
||||
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 {
|
||||
return (icon != nullptr);
|
||||
|
|
|
@ -26,7 +26,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "window/window_session_controller.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/notifications_manager.h"
|
||||
#include "settings/settings_common.h"
|
||||
#include "storage/localimageloader.h"
|
||||
#include "data/data_document_resolver.h"
|
||||
#include "styles/style_settings.h"
|
||||
|
@ -144,7 +143,6 @@ void SetupExperimental(
|
|||
addToggle(Ui::kOptionUseSmallMsgBubbleRadius);
|
||||
addToggle(Media::Player::kOptionDisableAutoplayNext);
|
||||
addToggle(kOptionSendLargePhotos);
|
||||
addToggle(Settings::kOptionMonoSettingsIcons);
|
||||
addToggle(Webview::kOptionWebviewDebugEnabled);
|
||||
addToggle(kOptionAutoScrollInactiveChat);
|
||||
addToggle(Window::Notifications::kOptionGNotification);
|
||||
|
|
|
@ -543,7 +543,7 @@ void FilterRowButton::paintEvent(QPaintEvent *e) {
|
|||
container,
|
||||
tr::lng_filters_create(),
|
||||
st::settingsButtonActive,
|
||||
{ &st::settingsIconAdd, 0, IconType::Round, &st::windowBgActive }
|
||||
{ &st::settingsIconAdd, IconType::Round, &st::windowBgActive }
|
||||
)->setClickedCallback([=] {
|
||||
if (showLimitReached()) {
|
||||
return;
|
||||
|
|