Added margin to emote search (#3543)

Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
qooq69
2022-03-26 14:46:22 +01:00
committed by GitHub
parent 554313d645
commit 3c46572c51
2 changed files with 11 additions and 2 deletions
+10 -1
View File
@@ -168,13 +168,22 @@ EmotePopup::EmotePopup(QWidget *parent)
searchRegex.setPatternOptions(QRegularExpression::CaseInsensitiveOption);
QValidator *searchValidator = new QRegularExpressionValidator(searchRegex);
layout->setMargin(0);
layout->setSpacing(0);
QHBoxLayout *layout2 = new QHBoxLayout(this);
layout2->setMargin(8);
layout2->setSpacing(8);
this->search_ = new QLineEdit();
this->search_->setPlaceholderText("Search all emotes...");
this->search_->setValidator(searchValidator);
this->search_->setClearButtonEnabled(true);
this->search_->findChild<QAbstractButton *>()->setIcon(
QPixmap(":/buttons/clearSearch.png"));
layout->addWidget(this->search_);
layout2->addWidget(this->search_);
layout->addLayout(layout2);
QObject::connect(this->search_, &QLineEdit::textChanged, this,
&EmotePopup::filterEmotes);