started fixing clicking emtoes

This commit is contained in:
fourtf
2018-01-24 20:58:53 +01:00
parent 74fd6c9663
commit 05339aad2d
6 changed files with 26 additions and 3 deletions
+12 -2
View File
@@ -52,8 +52,13 @@ SplitInput::SplitInput(Split *_chatWidget)
"/>");
connect(&this->emotesLabel, &RippleEffectLabel::clicked, [this] {
if (this->emotePopup == nullptr) {
this->emotePopup = new EmotePopup(this->themeManager);
if (!this->emotePopup) {
this->emotePopup = std::make_unique<EmotePopup>(this->themeManager);
this->emotePopup->linkClicked.connect([this](const messages::Link &link) {
if (link.getType() == messages::Link::InsertText) {
this->insertText(link.getValue());
}
});
}
this->emotePopup->resize((int)(300 * this->emotePopup->getDpiMultiplier()),
@@ -210,6 +215,11 @@ QString SplitInput::getInputText() const
return this->textInput.toPlainText();
}
void SplitInput::insertText(const QString &text)
{
this->textInput.insertPlainText(text);
}
void SplitInput::refreshTheme()
{
QPalette palette;