2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Moved out generation of currency icon from svg to td_ui.

This commit is contained in:
23rd
2024-10-27 11:03:57 +03:00
parent 187139473d
commit 2e0e4006a1
7 changed files with 92 additions and 55 deletions

View File

@@ -47,7 +47,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "history/view/history_view_item_preview.h"
#include "info/bot/earn/info_bot_earn_widget.h"
#include "info/channel_statistics/earn/earn_format.h"
#include "info/channel_statistics/earn/info_channel_earn_list.h" // IconCurrency.
#include "info/channel_statistics/earn/earn_icons.h"
#include "info/channel_statistics/earn/info_channel_earn_list.h"
#include "info/profile/info_profile_icon.h"
#include "info/profile/info_profile_phone_menu.h"
#include "info/profile/info_profile_text.h"
@@ -815,8 +816,8 @@ rpl::producer<uint64> AddCurrencyAction(
const auto name = Ui::CreateChild<Ui::FlatLabel>(button, st.rightLabel);
const auto icon = Ui::Text::SingleCustomEmoji(
user->owner().customEmojiManager().registerInternalEmoji(
Info::ChannelEarn::IconCurrency(
st.rightLabel,
Ui::Earn::IconCurrencyColored(
st.rightLabel.style.font,
st.rightLabel.textFg->c),
st::channelEarnCurrencyCommonMargins,
false));