Update some icons for starref sections.
BIN
Telegram/Resources/icons/menu/affiliate_simple.png
Normal file
After Width: | Height: | Size: 655 B |
BIN
Telegram/Resources/icons/menu/affiliate_simple@2x.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
Telegram/Resources/icons/menu/affiliate_simple@3x.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
Telegram/Resources/icons/menu/affiliate_transparent.png
Normal file
After Width: | Height: | Size: 820 B |
BIN
Telegram/Resources/icons/menu/affiliate_transparent@2x.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
Telegram/Resources/icons/menu/affiliate_transparent@3x.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
Telegram/Resources/icons/menu/bot.png
Normal file
After Width: | Height: | Size: 586 B |
BIN
Telegram/Resources/icons/menu/bot@2x.png
Normal file
After Width: | Height: | Size: 1 KiB |
BIN
Telegram/Resources/icons/menu/bot@3x.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
Telegram/Resources/icons/menu/bot_add.png
Normal file
After Width: | Height: | Size: 699 B |
BIN
Telegram/Resources/icons/menu/bot_add@2x.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
Telegram/Resources/icons/menu/bot_add@3x.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
Telegram/Resources/icons/menu/stars_share.png
Normal file
After Width: | Height: | Size: 791 B |
BIN
Telegram/Resources/icons/menu/stars_share@2x.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
Telegram/Resources/icons/menu/stars_share@3x.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 654 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.5 KiB |
|
@ -24,6 +24,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "ui/effects/premium_top_bar.h"
|
||||
#include "ui/layers/generic_box.h"
|
||||
#include "ui/text/text_utilities.h"
|
||||
#include "ui/widgets/menu/menu_add_action_callback.h"
|
||||
#include "ui/widgets/menu/menu_add_action_callback_factory.h"
|
||||
#include "ui/widgets/buttons.h"
|
||||
#include "ui/widgets/continuous_sliders.h"
|
||||
#include "ui/widgets/labels.h"
|
||||
|
@ -318,7 +320,7 @@ void ListController::showLink(not_null<PeerData*> peer, RowState state) {
|
|||
|
||||
box->addButton(tr::lng_star_ref_link_copy(), [=] {
|
||||
QApplication::clipboard()->setText(state.link);
|
||||
window->showToast(u"Link copied to clipboard."_q);
|
||||
window->showToast(tr::lng_username_copied(tr::now));
|
||||
});
|
||||
box->addButton(tr::lng_cancel(), [=] {
|
||||
box->closeBox();
|
||||
|
@ -398,14 +400,17 @@ base::unique_qptr<Ui::PopupMenu> ListController::rowContextMenu(
|
|||
auto result = base::make_unique_q<Ui::PopupMenu>(
|
||||
parent,
|
||||
st::popupMenuWithIcons);
|
||||
result->addAction(tr::lng_star_ref_list_my_open(tr::now), [=] {
|
||||
const auto addAction = Ui::Menu::CreateAddActionCallback(result.get());
|
||||
|
||||
addAction(tr::lng_star_ref_list_my_open(tr::now), [=] {
|
||||
_controller->parentController()->showPeerHistory(peer);
|
||||
}, &st::menuIconBotCommands);
|
||||
result->addAction(tr::lng_star_ref_list_my_copy(tr::now), [=] {
|
||||
}, &st::menuIconBot);
|
||||
addAction(tr::lng_star_ref_list_my_copy(tr::now), [=] {
|
||||
QApplication::clipboard()->setText(state.link);
|
||||
_controller->parentController()->showToast(u"Link copied to clipboard."_q);
|
||||
_controller->parentController()->showToast(
|
||||
tr::lng_username_copied(tr::now));
|
||||
}, &st::menuIconLinks);
|
||||
result->addAction(tr::lng_star_ref_list_my_leave(tr::now), [=] {
|
||||
const auto revoke = [=] {
|
||||
session().api().request(MTPpayments_EditConnectedStarRefBot(
|
||||
MTP_flags(MTPpayments_EditConnectedStarRefBot::Flag::f_revoked),
|
||||
_peer->input,
|
||||
|
@ -415,7 +420,13 @@ base::unique_qptr<Ui::PopupMenu> ListController::rowContextMenu(
|
|||
}).fail([=](const MTP::Error &error) {
|
||||
_controller->parentController()->showToast(u"Failed: "_q + error.type());
|
||||
}).send();
|
||||
}, &st::menuIconLeaveAttention);
|
||||
};
|
||||
addAction({
|
||||
.text = tr::lng_star_ref_list_my_leave(tr::now),
|
||||
.handler = revoke,
|
||||
.icon = &st::menuIconLeaveAttention,
|
||||
.isAttention = true,
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -477,12 +488,12 @@ void InnerWidget::setupInfo() {
|
|||
_container->add(infoRow(
|
||||
tr::lng_star_ref_transparent_title(),
|
||||
tr::lng_star_ref_transparent_about(),
|
||||
&st::menuIconShowInChat));
|
||||
&st::menuIconTransparent));
|
||||
|
||||
_container->add(infoRow(
|
||||
tr::lng_star_ref_simple_title(),
|
||||
tr::lng_star_ref_simple_about(),
|
||||
&st::menuIconBoosts));
|
||||
&st::menuIconLike));
|
||||
}
|
||||
|
||||
void InnerWidget::setupMy() {
|
||||
|
|
|
@ -135,7 +135,7 @@ void InnerWidget::setupInfo() {
|
|||
_container->add(infoRow(
|
||||
tr::lng_star_ref_share_title(),
|
||||
tr::lng_star_ref_share_about(),
|
||||
&st::menuIconPremium));
|
||||
&st::menuIconStarRefShare));
|
||||
|
||||
_container->add(infoRow(
|
||||
tr::lng_star_ref_launch_title(),
|
||||
|
@ -650,7 +650,7 @@ not_null<Ui::AbstractButton*> AddViewListButton(
|
|||
}, dummy->lifetime());
|
||||
|
||||
::Settings::AddButtonIcon(dummy, st::settingsButton, {
|
||||
.icon = &st::settingsPremiumIconStar,
|
||||
.icon = &st::settingsStarRefEarnStars,
|
||||
.backgroundBrush = st::premiumIconBg3,
|
||||
});
|
||||
|
||||
|
|
|
@ -123,6 +123,8 @@ settingsBusinessPromoChatbots: icon {{ "settings/premium/promo/business_chatbot"
|
|||
settingsBusinessPromoChatIntro: icon {{ "settings/premium/promo/business_intro", premiumButtonBg1 }};
|
||||
settingsBusinessPromoChatLinks: icon {{ "settings/premium/promo/business_chatlink", premiumButtonBg1 }};
|
||||
|
||||
settingsStarRefEarnStars: icon {{ "settings/premium/business/earn_stars", settingsIconFg }};
|
||||
|
||||
settingsPremiumNewBadge: FlatLabel(defaultFlatLabel) {
|
||||
style: TextStyle(semiboldTextStyle) {
|
||||
font: font(10px semibold);
|
||||
|
|
|
@ -138,6 +138,7 @@ menuIconSigned: icon {{ "menu/signed", menuIconColor }};
|
|||
menuIconAntispam: icon {{ "menu/antispam", menuIconColor }};
|
||||
menuIconChatDiscuss: icon {{ "menu/chat_discuss", menuIconColor }};
|
||||
menuIconChats: icon {{ "menu/chats", menuIconColor }};
|
||||
menuIconBot: icon {{ "menu/bot", menuIconColor }};
|
||||
menuIconBotCommands: icon {{ "menu/bot_commands", menuIconColor }};
|
||||
menuIconPremium: icon {{ "menu/premium", menuIconColor }};
|
||||
menuIconShop: icon {{ "menu/shop", menuIconColor }};
|
||||
|
@ -162,7 +163,10 @@ menuIconAppleWatch: icon {{ "menu/passcode_watch", menuIconColor }};
|
|||
menuIconSystemPwd: menuIconPermissions;
|
||||
menuIconPlayerFullScreen: icon {{ "player/player_fullscreen", menuIconColor }};
|
||||
menuIconPlayerWindowed: icon {{ "player/player_minimize", menuIconColor }};
|
||||
menuIconStarRefLink: icon{{ "settings/premium/features/feature_links2", menuIconColor }};
|
||||
menuIconStarRefShare: icon {{ "menu/stars_share", menuIconColor }};
|
||||
menuIconStarRefLink: icon {{ "settings/premium/features/feature_links2", menuIconColor }};
|
||||
menuIconTransparent: icon {{ "menu/affiliate_transparent", menuIconColor }};
|
||||
menuIconLike: icon {{ "menu/affiliate_simple", menuIconColor }};
|
||||
|
||||
menuIconTTLAny: icon {{ "menu/auto_delete_plain", menuIconColor }};
|
||||
menuIconTTLAnyTextPosition: point(11px, 22px);
|
||||
|
|