mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Added initial ability to use credits icon as emoji.
This commit is contained in:
@@ -27,6 +27,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "ffmpeg/ffmpeg_frame_generator.h"
|
||||
#include "chat_helpers/stickers_lottie.h"
|
||||
#include "storage/file_download.h" // kMaxFileInMemory
|
||||
#include "ui/effects/credits_graphics.h"
|
||||
#include "ui/widgets/fields/input_field.h"
|
||||
#include "ui/text/custom_emoji_instance.h"
|
||||
#include "ui/text/text_custom_emoji.h"
|
||||
@@ -963,6 +964,14 @@ uint64 CustomEmojiManager::coloredSetId() const {
|
||||
return _coloredSetId;
|
||||
}
|
||||
|
||||
TextWithEntities CustomEmojiManager::creditsEmoji(QMargins padding) {
|
||||
return Ui::Text::SingleCustomEmoji(
|
||||
registerInternalEmoji(
|
||||
Ui::GenerateStars(st::normalFont->height, 1),
|
||||
padding,
|
||||
false));
|
||||
}
|
||||
|
||||
QString CustomEmojiManager::registerInternalEmoji(
|
||||
QImage emoji,
|
||||
QMargins padding,
|
||||
|
@@ -99,6 +99,8 @@ public:
|
||||
|
||||
[[nodiscard]] uint64 coloredSetId() const;
|
||||
|
||||
[[nodiscard]] TextWithEntities creditsEmoji(QMargins padding = {});
|
||||
|
||||
private:
|
||||
static constexpr auto kSizeCount = int(SizeTag::kCount);
|
||||
|
||||
|
Reference in New Issue
Block a user