Update Settings and Signals version (#3398)
Co-authored-by: zneix <zneix@zneix.eu>
This commit is contained in:
@@ -16,19 +16,19 @@ TooltipPreviewImage::TooltipPreviewImage()
|
||||
{
|
||||
auto windows = getApp()->windows;
|
||||
|
||||
this->connections_.push_back(windows->gifRepaintRequested.connect([&] {
|
||||
this->connections_.managedConnect(windows->gifRepaintRequested, [&] {
|
||||
if (this->image_ && this->image_->animated())
|
||||
{
|
||||
this->refreshTooltipWidgetPixmap();
|
||||
}
|
||||
}));
|
||||
});
|
||||
|
||||
this->connections_.push_back(windows->miscUpdate.connect([&] {
|
||||
this->connections_.managedConnect(windows->miscUpdate, [&] {
|
||||
if (this->attemptRefresh)
|
||||
{
|
||||
this->refreshTooltipWidgetPixmap();
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
void TooltipPreviewImage::setImage(ImagePtr image)
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
#include "messages/Image.hpp"
|
||||
|
||||
#include <pajlada/signals/signalholder.hpp>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
class TooltipPreviewImage
|
||||
@@ -21,7 +23,7 @@ private:
|
||||
int imageWidth_ = 0;
|
||||
int imageHeight_ = 0;
|
||||
|
||||
std::vector<pajlada::Signals::ScopedConnection> connections_;
|
||||
pajlada::Signals::SignalHolder connections_;
|
||||
|
||||
// attemptRefresh is set to true in case we want to preview an image that has not loaded yet (if pixmapOrLoad fails)
|
||||
bool attemptRefresh{false};
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "common/FlagsEnum.hpp"
|
||||
#include "common/Singleton.hpp"
|
||||
#include "common/WindowDescriptors.hpp"
|
||||
|
||||
#include "pajlada/settings/settinglistener.hpp"
|
||||
#include "widgets/splits/SplitContainer.hpp"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user