mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Get the biggest version of emote from EmoteElement
This commit is contained in:
parent
959aa4616f
commit
7251a20dfb
1 changed files with 19 additions and 13 deletions
|
@ -1217,11 +1217,14 @@ void ChannelView::mouseMoveEvent(QMouseEvent *event)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (auto pixmap = hoverLayoutElement->imagePreview()) {
|
auto emoteElement = dynamic_cast<const EmoteElement*>(&hoverLayoutElement->getCreator());
|
||||||
|
|
||||||
|
if (emoteElement) {
|
||||||
|
auto pixmap = emoteElement->getEmote()->images.getImage(3.0)->pixmap();
|
||||||
|
if (pixmap) {
|
||||||
QBuffer buffer;
|
QBuffer buffer;
|
||||||
pixmap->save(&buffer, "PNG");
|
pixmap->save(&buffer, "PNG");
|
||||||
|
|
||||||
// FIXME: Image inside of imageLayoutElement is not always the biggest
|
|
||||||
// FIXME: Inject image directly into tooltipWidget without base64 bs
|
// FIXME: Inject image directly into tooltipWidget without base64 bs
|
||||||
// FIXME: Gifs are not animated
|
// FIXME: Gifs are not animated
|
||||||
// FIXME: No way to opt-out
|
// FIXME: No way to opt-out
|
||||||
|
@ -1235,6 +1238,9 @@ void ChannelView::mouseMoveEvent(QMouseEvent *event)
|
||||||
} else {
|
} else {
|
||||||
tooltipWidget->setText(tooltip);
|
tooltipWidget->setText(tooltip);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
tooltipWidget->setText(tooltip);
|
||||||
|
}
|
||||||
|
|
||||||
tooltipWidget->moveTo(this, event->globalPos());
|
tooltipWidget->moveTo(this, event->globalPos());
|
||||||
tooltipWidget->setWordWrap(isLinkValid);
|
tooltipWidget->setWordWrap(isLinkValid);
|
||||||
|
|
Loading…
Reference in a new issue