Update Settings and Signals version (#3398)

Co-authored-by: zneix <zneix@zneix.eu>
This commit is contained in:
pajlada
2021-12-19 15:57:56 +01:00
committed by GitHub
parent 60ff82f2de
commit 51ece94f58
39 changed files with 282 additions and 268 deletions
+4 -4
View File
@@ -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)
+3 -1
View File
@@ -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};
+1
View File
@@ -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"