mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Added initial ability to use credits icon as emoji.
This commit is contained in:
parent
ae18b4c851
commit
05fa2c381a
2 changed files with 11 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue