mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
ran clang
This commit is contained in:
parent
70bb63d20f
commit
3226ab6c68
|
@ -5,28 +5,33 @@
|
|||
#include "widgets/TooltipWidget.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
TooltipPreviewImage &TooltipPreviewImage::getInstance() {
|
||||
TooltipPreviewImage &TooltipPreviewImage::getInstance()
|
||||
{
|
||||
static TooltipPreviewImage *instance = new TooltipPreviewImage();
|
||||
return *instance;
|
||||
}
|
||||
|
||||
TooltipPreviewImage::TooltipPreviewImage() {
|
||||
connections_.push_back(getApp()->windows->gifRepaintRequested.connect(
|
||||
[&] {
|
||||
TooltipPreviewImage::TooltipPreviewImage()
|
||||
{
|
||||
connections_.push_back(getApp()->windows->gifRepaintRequested.connect([&] {
|
||||
auto tooltipWidget = TooltipWidget::getInstance();
|
||||
if (this->image_ && !tooltipWidget->isHidden()) {
|
||||
if (this->image_ && !tooltipWidget->isHidden())
|
||||
{
|
||||
auto pixmap = this->image_->pixmap();
|
||||
if (pixmap) {
|
||||
if (pixmap)
|
||||
{
|
||||
tooltipWidget->setImage(*pixmap);
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
tooltipWidget->clearImage();
|
||||
}
|
||||
}));
|
||||
|
||||
}
|
||||
|
||||
void TooltipPreviewImage::setImage(ImagePtr image) {
|
||||
void TooltipPreviewImage::setImage(ImagePtr image)
|
||||
{
|
||||
this->image_ = image;
|
||||
}
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
#include "messages/Image.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
class TooltipPreviewImage {
|
||||
class TooltipPreviewImage
|
||||
{
|
||||
public:
|
||||
static TooltipPreviewImage &getInstance();
|
||||
void setImage(ImagePtr image);
|
||||
|
|
Loading…
Reference in a new issue