diff --git a/src/singletons/Settings.hpp b/src/singletons/Settings.hpp index 0d103cc36..63f5f4f4c 100644 --- a/src/singletons/Settings.hpp +++ b/src/singletons/Settings.hpp @@ -192,6 +192,7 @@ public: QStringSetting currentVersion = {"/misc/currentVersion", ""}; BoolSetting loadTwitchMessageHistoryOnConnect = { "/misc/twitch/loadMessageHistoryOnConnect", true}; + BoolSetting emotesTooltipPreview = {"/misc/emotesTooltipPreview", false}; QStringSetting cachePath = {"/cache/path", ""}; diff --git a/src/widgets/helper/ChannelView.cpp b/src/widgets/helper/ChannelView.cpp index b89f0a46b..61b047380 100644 --- a/src/widgets/helper/ChannelView.cpp +++ b/src/widgets/helper/ChannelView.cpp @@ -1219,7 +1219,7 @@ void ChannelView::mouseMoveEvent(QMouseEvent *event) { auto emoteElement = dynamic_cast(&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("
%2x%3
%4") diff --git a/src/widgets/settingspages/GeneralPage.cpp b/src/widgets/settingspages/GeneralPage.cpp index 2df805554..9cf81a154 100644 --- a/src/widgets/settingspages/GeneralPage.cpp +++ b/src/widgets/settingspages/GeneralPage.cpp @@ -270,6 +270,7 @@ void GeneralPage::initLayout(SettingsLayout &layout) layout.addCheckbox("Double click links to open", s.linksDoubleClickOnly); layout.addCheckbox("Unshorten links", s.unshortLinks); layout.addCheckbox("Show live indicator in tabs", s.showTabLive); + layout.addCheckbox("Show emote preview in tooltip on hover", s.emotesTooltipPreview); layout.addSpacing(16); layout.addSeperator();