2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

Support colorized emoji in reactions inline dropdown.

This commit is contained in:
John Preston
2023-04-24 20:59:19 +04:00
parent 4cfa486d91
commit faf6352a11
6 changed files with 38 additions and 11 deletions

View File

@@ -399,7 +399,8 @@ QImage Reactions::resolveImageFor(
const auto frameSize = set.fromSelectAnimation
? (size / 2)
: size;
image = set.icon->frame().scaled(
// Must not be colored to text.
image = set.icon->frame(QColor()).scaled(
frameSize * factor,
frameSize * factor,
Qt::IgnoreAspectRatio,
@@ -480,6 +481,7 @@ void Reactions::setAnimatedIcon(ImageSet &set) {
set.icon = Ui::MakeAnimatedIcon({
.generator = DocumentIconFrameGenerator(set.media),
.sizeOverride = QSize(size, size),
.colorized = set.media->owner()->emojiUsesTextColor(),
});
set.media = nullptr;
}