animte emotes in colon emote input
This commit is contained in:
@@ -47,13 +47,11 @@ EmoteInputPopup::EmoteInputPopup(QWidget *parent)
|
|||||||
{
|
{
|
||||||
this->initLayout();
|
this->initLayout();
|
||||||
|
|
||||||
// this->connections_.addConnection(
|
QObject::connect(&this->redrawTimer_, &QTimer::timeout, this, [this] {
|
||||||
// getApp()->emotes->gifTimer.signal.connect([this] {
|
if (this->isVisible())
|
||||||
// if (this->isVisible())
|
this->ui_.listView->doItemsLayout();
|
||||||
// {
|
});
|
||||||
// // redraw listview somehow
|
this->redrawTimer_.setInterval(33);
|
||||||
// }
|
|
||||||
// }));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmoteInputPopup::initLayout()
|
void EmoteInputPopup::initLayout()
|
||||||
@@ -123,4 +121,14 @@ void EmoteInputPopup::setInputAction(ActionCallback callback)
|
|||||||
this->callback_ = std::move(callback);
|
this->callback_ = std::move(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EmoteInputPopup::showEvent(QShowEvent *)
|
||||||
|
{
|
||||||
|
this->redrawTimer_.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
void EmoteInputPopup::hideEvent(QHideEvent *)
|
||||||
|
{
|
||||||
|
this->redrawTimer_.stop();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace chatterino
|
} // namespace chatterino
|
||||||
|
|||||||
@@ -23,6 +23,10 @@ public:
|
|||||||
|
|
||||||
void setInputAction(ActionCallback callback);
|
void setInputAction(ActionCallback callback);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void showEvent(QShowEvent *event) override;
|
||||||
|
void hideEvent(QHideEvent *event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void initLayout();
|
void initLayout();
|
||||||
|
|
||||||
@@ -32,7 +36,7 @@ private:
|
|||||||
|
|
||||||
GenericListModel model_;
|
GenericListModel model_;
|
||||||
ActionCallback callback_;
|
ActionCallback callback_;
|
||||||
// pajlada::Signals::SignalHolder connections_;
|
QTimer redrawTimer_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace chatterino
|
} // namespace chatterino
|
||||||
|
|||||||
Reference in New Issue
Block a user