Fix preview on hover not working when Animated emotes options was disabled.
Fixes #1546 This change introduces a "window timer" that runs every 100ms that we use to update the pixmap if necessary, since there is no signal for "let me know when this image is done loading".
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "messages/Image.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
class TooltipPreviewImage
|
||||
{
|
||||
public:
|
||||
@@ -17,5 +18,13 @@ private:
|
||||
private:
|
||||
ImagePtr image_ = nullptr;
|
||||
std::vector<pajlada::Signals::ScopedConnection> 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};
|
||||
|
||||
// Refresh the pixmap used in the Tooltip Widget
|
||||
// Called from setImage and from the "gif repaint" signal if the image is animated
|
||||
void refreshTooltipWidgetPixmap();
|
||||
};
|
||||
|
||||
} // namespace chatterino
|
||||
|
||||
Reference in New Issue
Block a user