mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Make Emotes Tooltip Preview disablable in the Settings
This commit is contained in:
parent
a569985315
commit
8b79faf958
|
@ -192,6 +192,7 @@ public:
|
|||
QStringSetting currentVersion = {"/misc/currentVersion", ""};
|
||||
BoolSetting loadTwitchMessageHistoryOnConnect = {
|
||||
"/misc/twitch/loadMessageHistoryOnConnect", true};
|
||||
BoolSetting emotesTooltipPreview = {"/misc/emotesTooltipPreview", false};
|
||||
|
||||
QStringSetting cachePath = {"/cache/path", ""};
|
||||
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue