Make Emotes Tooltip Preview disablable in the Settings

This commit is contained in:
rexim
2019-05-28 23:43:36 +07:00
parent a569985315
commit 8b79faf958
3 changed files with 3 additions and 2 deletions
+1 -2
View File
@@ -1219,7 +1219,7 @@ void ChannelView::mouseMoveEvent(QMouseEvent *event)
{
auto emoteElement = dynamic_cast<const EmoteElement*>(&hoverLayoutElement->getCreator());
if (emoteElement) {
if (emoteElement && getSettings()->emotesTooltipPreview.getValue()) {
auto pixmap = emoteElement->getEmote()->images.getImage(3.0)->pixmap();
if (pixmap) {
QBuffer buffer;
@@ -1227,7 +1227,6 @@ void ChannelView::mouseMoveEvent(QMouseEvent *event)
// FIXME: Inject image directly into tooltipWidget without base64 bs
// FIXME: Gifs are not animated
// FIXME: No way to opt-out
tooltipWidget->setText(
QString("<img src='data:image/png;base64,%1' /><br/>%2x%3<br/>%4")