mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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 "ffmpeg/ffmpeg_frame_generator.h"
|
||||||
#include "chat_helpers/stickers_lottie.h"
|
#include "chat_helpers/stickers_lottie.h"
|
||||||
#include "storage/file_download.h" // kMaxFileInMemory
|
#include "storage/file_download.h" // kMaxFileInMemory
|
||||||
|
#include "ui/effects/credits_graphics.h"
|
||||||
#include "ui/widgets/fields/input_field.h"
|
#include "ui/widgets/fields/input_field.h"
|
||||||
#include "ui/text/custom_emoji_instance.h"
|
#include "ui/text/custom_emoji_instance.h"
|
||||||
#include "ui/text/text_custom_emoji.h"
|
#include "ui/text/text_custom_emoji.h"
|
||||||
|
@ -963,6 +964,14 @@ uint64 CustomEmojiManager::coloredSetId() const {
|
||||||
return _coloredSetId;
|
return _coloredSetId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TextWithEntities CustomEmojiManager::creditsEmoji(QMargins padding) {
|
||||||
|
return Ui::Text::SingleCustomEmoji(
|
||||||
|
registerInternalEmoji(
|
||||||
|
Ui::GenerateStars(st::normalFont->height, 1),
|
||||||
|
padding,
|
||||||
|
false));
|
||||||
|
}
|
||||||
|
|
||||||
QString CustomEmojiManager::registerInternalEmoji(
|
QString CustomEmojiManager::registerInternalEmoji(
|
||||||
QImage emoji,
|
QImage emoji,
|
||||||
QMargins padding,
|
QMargins padding,
|
||||||
|
|
|
@ -99,6 +99,8 @@ public:
|
||||||
|
|
||||||
[[nodiscard]] uint64 coloredSetId() const;
|
[[nodiscard]] uint64 coloredSetId() const;
|
||||||
|
|
||||||
|
[[nodiscard]] TextWithEntities creditsEmoji(QMargins padding = {});
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static constexpr auto kSizeCount = int(SizeTag::kCount);
|
static constexpr auto kSizeCount = int(SizeTag::kCount);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue