From 82196e3e82aae6cf809eb06d970f5e5fb6955cbe Mon Sep 17 00:00:00 2001 From: qooq69 <52359859+qooq69@users.noreply.github.com> Date: Sun, 13 Feb 2022 16:05:38 +0100 Subject: [PATCH] Added incremental search to channel search. (#3544) Co-authored-by: pajlada --- CHANGELOG.md | 1 + src/widgets/helper/SearchPopup.cpp | 19 ++++++------------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f61b4b430..e34a29f3d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,6 +54,7 @@ - Minor: Removed timestamp from AutoMod messages. (#3503) - Minor: Added ability to copy message ID with `Shift + Right Click`. (#3481) - Minor: Colorize the entire split header when focused. (#3379) +- Minor: Added incremental search to channel search. (#3544) - Minor: Show right click context menu anywhere within a message's line. (#3566) - Minor: Make Tab Layout setting only accept predefined values (#3564) - Bugfix: Fix Split Input hotkeys not being available when input is hidden (#3362) diff --git a/src/widgets/helper/SearchPopup.cpp b/src/widgets/helper/SearchPopup.cpp index 6c9ac9634..731ebe0ce 100644 --- a/src/widgets/helper/SearchPopup.cpp +++ b/src/widgets/helper/SearchPopup.cpp @@ -151,20 +151,13 @@ void SearchPopup::initLayout() { this->searchInput_ = new QLineEdit(this); layout2->addWidget(this->searchInput_); - QObject::connect(this->searchInput_, &QLineEdit::returnPressed, - [this] { - this->search(); - }); - } - // SEARCH BUTTON - { - QPushButton *searchButton = new QPushButton(this); - searchButton->setText("Search"); - layout2->addWidget(searchButton); - QObject::connect(searchButton, &QPushButton::clicked, [this] { - this->search(); - }); + this->searchInput_->setPlaceholderText("Type to search"); + this->searchInput_->setClearButtonEnabled(true); + this->searchInput_->findChild()->setIcon( + QPixmap(":/buttons/clearSearch.png")); + QObject::connect(this->searchInput_, &QLineEdit::textChanged, + this, &SearchPopup::search); } layout1->addLayout(layout2);