Update some icons for starref sections.

This commit is contained in:
John Preston 2024-11-27 14:47:12 +04:00
parent 62d2346471
commit 3b3d1aa9cc
22 changed files with 29 additions and 12 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 655 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 820 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 699 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 791 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 654 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -24,6 +24,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/effects/premium_top_bar.h" #include "ui/effects/premium_top_bar.h"
#include "ui/layers/generic_box.h" #include "ui/layers/generic_box.h"
#include "ui/text/text_utilities.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/buttons.h"
#include "ui/widgets/continuous_sliders.h" #include "ui/widgets/continuous_sliders.h"
#include "ui/widgets/labels.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(), [=] { box->addButton(tr::lng_star_ref_link_copy(), [=] {
QApplication::clipboard()->setText(state.link); 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->addButton(tr::lng_cancel(), [=] {
box->closeBox(); box->closeBox();
@ -398,14 +400,17 @@ base::unique_qptr<Ui::PopupMenu> ListController::rowContextMenu(
auto result = base::make_unique_q<Ui::PopupMenu>( auto result = base::make_unique_q<Ui::PopupMenu>(
parent, parent,
st::popupMenuWithIcons); 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); _controller->parentController()->showPeerHistory(peer);
}, &st::menuIconBotCommands); }, &st::menuIconBot);
result->addAction(tr::lng_star_ref_list_my_copy(tr::now), [=] { addAction(tr::lng_star_ref_list_my_copy(tr::now), [=] {
QApplication::clipboard()->setText(state.link); 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); }, &st::menuIconLinks);
result->addAction(tr::lng_star_ref_list_my_leave(tr::now), [=] { const auto revoke = [=] {
session().api().request(MTPpayments_EditConnectedStarRefBot( session().api().request(MTPpayments_EditConnectedStarRefBot(
MTP_flags(MTPpayments_EditConnectedStarRefBot::Flag::f_revoked), MTP_flags(MTPpayments_EditConnectedStarRefBot::Flag::f_revoked),
_peer->input, _peer->input,
@ -415,7 +420,13 @@ base::unique_qptr<Ui::PopupMenu> ListController::rowContextMenu(
}).fail([=](const MTP::Error &error) { }).fail([=](const MTP::Error &error) {
_controller->parentController()->showToast(u"Failed: "_q + error.type()); _controller->parentController()->showToast(u"Failed: "_q + error.type());
}).send(); }).send();
}, &st::menuIconLeaveAttention); };
addAction({
.text = tr::lng_star_ref_list_my_leave(tr::now),
.handler = revoke,
.icon = &st::menuIconLeaveAttention,
.isAttention = true,
});
return result; return result;
} }
@ -477,12 +488,12 @@ void InnerWidget::setupInfo() {
_container->add(infoRow( _container->add(infoRow(
tr::lng_star_ref_transparent_title(), tr::lng_star_ref_transparent_title(),
tr::lng_star_ref_transparent_about(), tr::lng_star_ref_transparent_about(),
&st::menuIconShowInChat)); &st::menuIconTransparent));
_container->add(infoRow( _container->add(infoRow(
tr::lng_star_ref_simple_title(), tr::lng_star_ref_simple_title(),
tr::lng_star_ref_simple_about(), tr::lng_star_ref_simple_about(),
&st::menuIconBoosts)); &st::menuIconLike));
} }
void InnerWidget::setupMy() { void InnerWidget::setupMy() {

View file

@ -135,7 +135,7 @@ void InnerWidget::setupInfo() {
_container->add(infoRow( _container->add(infoRow(
tr::lng_star_ref_share_title(), tr::lng_star_ref_share_title(),
tr::lng_star_ref_share_about(), tr::lng_star_ref_share_about(),
&st::menuIconPremium)); &st::menuIconStarRefShare));
_container->add(infoRow( _container->add(infoRow(
tr::lng_star_ref_launch_title(), tr::lng_star_ref_launch_title(),
@ -650,7 +650,7 @@ not_null<Ui::AbstractButton*> AddViewListButton(
}, dummy->lifetime()); }, dummy->lifetime());
::Settings::AddButtonIcon(dummy, st::settingsButton, { ::Settings::AddButtonIcon(dummy, st::settingsButton, {
.icon = &st::settingsPremiumIconStar, .icon = &st::settingsStarRefEarnStars,
.backgroundBrush = st::premiumIconBg3, .backgroundBrush = st::premiumIconBg3,
}); });

View file

@ -123,6 +123,8 @@ settingsBusinessPromoChatbots: icon {{ "settings/premium/promo/business_chatbot"
settingsBusinessPromoChatIntro: icon {{ "settings/premium/promo/business_intro", premiumButtonBg1 }}; settingsBusinessPromoChatIntro: icon {{ "settings/premium/promo/business_intro", premiumButtonBg1 }};
settingsBusinessPromoChatLinks: icon {{ "settings/premium/promo/business_chatlink", premiumButtonBg1 }}; settingsBusinessPromoChatLinks: icon {{ "settings/premium/promo/business_chatlink", premiumButtonBg1 }};
settingsStarRefEarnStars: icon {{ "settings/premium/business/earn_stars", settingsIconFg }};
settingsPremiumNewBadge: FlatLabel(defaultFlatLabel) { settingsPremiumNewBadge: FlatLabel(defaultFlatLabel) {
style: TextStyle(semiboldTextStyle) { style: TextStyle(semiboldTextStyle) {
font: font(10px semibold); font: font(10px semibold);

View file

@ -138,6 +138,7 @@ menuIconSigned: icon {{ "menu/signed", menuIconColor }};
menuIconAntispam: icon {{ "menu/antispam", menuIconColor }}; menuIconAntispam: icon {{ "menu/antispam", menuIconColor }};
menuIconChatDiscuss: icon {{ "menu/chat_discuss", menuIconColor }}; menuIconChatDiscuss: icon {{ "menu/chat_discuss", menuIconColor }};
menuIconChats: icon {{ "menu/chats", menuIconColor }}; menuIconChats: icon {{ "menu/chats", menuIconColor }};
menuIconBot: icon {{ "menu/bot", menuIconColor }};
menuIconBotCommands: icon {{ "menu/bot_commands", menuIconColor }}; menuIconBotCommands: icon {{ "menu/bot_commands", menuIconColor }};
menuIconPremium: icon {{ "menu/premium", menuIconColor }}; menuIconPremium: icon {{ "menu/premium", menuIconColor }};
menuIconShop: icon {{ "menu/shop", menuIconColor }}; menuIconShop: icon {{ "menu/shop", menuIconColor }};
@ -162,7 +163,10 @@ menuIconAppleWatch: icon {{ "menu/passcode_watch", menuIconColor }};
menuIconSystemPwd: menuIconPermissions; menuIconSystemPwd: menuIconPermissions;
menuIconPlayerFullScreen: icon {{ "player/player_fullscreen", menuIconColor }}; menuIconPlayerFullScreen: icon {{ "player/player_fullscreen", menuIconColor }};
menuIconPlayerWindowed: icon {{ "player/player_minimize", 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 }}; menuIconTTLAny: icon {{ "menu/auto_delete_plain", menuIconColor }};
menuIconTTLAnyTextPosition: point(11px, 22px); menuIconTTLAnyTextPosition: point(11px, 22px);