Preview images instead of emotes

This commit is contained in:
rexim
2019-06-05 01:18:32 +07:00
parent a84716547b
commit 0fb16d150b
2 changed files with 6 additions and 6 deletions
+4 -4
View File
@@ -313,8 +313,8 @@ void ChannelView::queueUpdate()
// this->repaint();
auto tooltipWidget = TooltipWidget::getInstance();
if (this->currentPreviewEmote) {
auto pixmap = this->currentPreviewEmote->images.getImage(3.0)->pixmap();
if (this->currentPreviewImage) {
auto pixmap = this->currentPreviewImage->pixmap();
if (pixmap) {
tooltipWidget->setImage(*pixmap);
}
@@ -1228,9 +1228,9 @@ void ChannelView::mouseMoveEvent(QMouseEvent *event)
{
auto emoteElement = dynamic_cast<const EmoteElement*>(&hoverLayoutElement->getCreator());
if (emoteElement && getSettings()->emotesTooltipPreview.getValue()) {
this->currentPreviewEmote = emoteElement->getEmote();
this->currentPreviewImage = emoteElement->getEmote()->images.getImage(3.0);
} else {
this->currentPreviewEmote = nullptr;
this->currentPreviewImage = nullptr;
tooltipWidget->clearImage();
}