mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Added option for shift, used clang and made setting uneditable
This commit is contained in:
parent
f362548e28
commit
70bb63d20f
2 changed files with 22 additions and 9 deletions
|
@ -15,8 +15,8 @@
|
||||||
#include "providers/twitch/TwitchServer.hpp"
|
#include "providers/twitch/TwitchServer.hpp"
|
||||||
#include "singletons/Settings.hpp"
|
#include "singletons/Settings.hpp"
|
||||||
#include "singletons/Theme.hpp"
|
#include "singletons/Theme.hpp"
|
||||||
#include "singletons/WindowManager.hpp"
|
|
||||||
#include "singletons/TooltipPreviewImage.hpp"
|
#include "singletons/TooltipPreviewImage.hpp"
|
||||||
|
#include "singletons/WindowManager.hpp"
|
||||||
#include "util/DistanceBetweenPoints.hpp"
|
#include "util/DistanceBetweenPoints.hpp"
|
||||||
#include "util/IncognitoBrowser.hpp"
|
#include "util/IncognitoBrowser.hpp"
|
||||||
#include "widgets/Scrollbar.hpp"
|
#include "widgets/Scrollbar.hpp"
|
||||||
|
@ -1220,10 +1220,24 @@ void ChannelView::mouseMoveEvent(QMouseEvent *event)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto &tooltipPreviewImage = TooltipPreviewImage::getInstance();
|
auto &tooltipPreviewImage = TooltipPreviewImage::getInstance();
|
||||||
auto emoteElement = dynamic_cast<const EmoteElement*>(&hoverLayoutElement->getCreator());
|
auto emoteElement = dynamic_cast<const EmoteElement *>(
|
||||||
if (emoteElement && getSettings()->emotesTooltipPreview.getValue()) {
|
&hoverLayoutElement->getCreator());
|
||||||
tooltipPreviewImage.setImage(emoteElement->getEmote()->images.getImage(3.0));
|
|
||||||
} else {
|
if (emoteElement && getSettings()->emotesTooltipPreview.getValue())
|
||||||
|
{
|
||||||
|
if (event->modifiers() == Qt::ShiftModifier ||
|
||||||
|
getSettings()->emotesTooltipPreview.getValue() == 1)
|
||||||
|
{
|
||||||
|
tooltipPreviewImage.setImage(
|
||||||
|
emoteElement->getEmote()->images.getImage(3.0));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tooltipPreviewImage.setImage(nullptr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
tooltipPreviewImage.setImage(nullptr);
|
tooltipPreviewImage.setImage(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -272,10 +272,9 @@ void GeneralPage::initLayout(SettingsLayout &layout)
|
||||||
layout.addCheckbox("Show live indicator in tabs", s.showTabLive);
|
layout.addCheckbox("Show live indicator in tabs", s.showTabLive);
|
||||||
layout.addDropdown<int>(
|
layout.addDropdown<int>(
|
||||||
"Show emote preview in tooltip on hover",
|
"Show emote preview in tooltip on hover",
|
||||||
{"Don't show", "Always show"},
|
{"Don't show", "Always show", "Hold shift"}, s.emotesTooltipPreview,
|
||||||
s.emotesTooltipPreview,
|
[](int index) { return index; }, [](auto args) { return args.index; },
|
||||||
[](int index) { return index; },
|
false);
|
||||||
[](auto args) { return args.index; });
|
|
||||||
|
|
||||||
layout.addSpacing(16);
|
layout.addSpacing(16);
|
||||||
layout.addSeperator();
|
layout.addSeperator();
|
||||||
|
|
Loading…
Reference in a new issue