mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Merge pull request #1 from apa420/976-apa
Added option for shift, used clang and made setting uneditable
This commit is contained in:
commit
5b0368cc35
|
@ -15,8 +15,8 @@
|
|||
#include "providers/twitch/TwitchServer.hpp"
|
||||
#include "singletons/Settings.hpp"
|
||||
#include "singletons/Theme.hpp"
|
||||
#include "singletons/WindowManager.hpp"
|
||||
#include "singletons/TooltipPreviewImage.hpp"
|
||||
#include "singletons/WindowManager.hpp"
|
||||
#include "util/DistanceBetweenPoints.hpp"
|
||||
#include "util/IncognitoBrowser.hpp"
|
||||
#include "widgets/Scrollbar.hpp"
|
||||
|
@ -1220,10 +1220,24 @@ void ChannelView::mouseMoveEvent(QMouseEvent *event)
|
|||
else
|
||||
{
|
||||
auto &tooltipPreviewImage = TooltipPreviewImage::getInstance();
|
||||
auto emoteElement = dynamic_cast<const EmoteElement*>(&hoverLayoutElement->getCreator());
|
||||
if (emoteElement && getSettings()->emotesTooltipPreview.getValue()) {
|
||||
tooltipPreviewImage.setImage(emoteElement->getEmote()->images.getImage(3.0));
|
||||
} else {
|
||||
auto emoteElement = dynamic_cast<const EmoteElement *>(
|
||||
&hoverLayoutElement->getCreator());
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -272,10 +272,9 @@ void GeneralPage::initLayout(SettingsLayout &layout)
|
|||
layout.addCheckbox("Show live indicator in tabs", s.showTabLive);
|
||||
layout.addDropdown<int>(
|
||||
"Show emote preview in tooltip on hover",
|
||||
{"Don't show", "Always show"},
|
||||
s.emotesTooltipPreview,
|
||||
[](int index) { return index; },
|
||||
[](auto args) { return args.index; });
|
||||
{"Don't show", "Always show", "Hold shift"}, s.emotesTooltipPreview,
|
||||
[](int index) { return index; }, [](auto args) { return args.index; },
|
||||
false);
|
||||
|
||||
layout.addSpacing(16);
|
||||
layout.addSeperator();
|
||||
|
|
Loading…
Reference in a new issue