diff --git a/frontend/control/search-line-edit.cpp b/frontend/control/search-line-edit.cpp index f4b213b..3b753fd 100644 --- a/frontend/control/search-line-edit.cpp +++ b/frontend/control/search-line-edit.cpp @@ -75,6 +75,11 @@ SearchLineEdit::SearchLineEdit(QWidget *parent) : QLineEdit(parent) { m_timer->start(0.1 * 1000); } }); + + //跟随主题透明度变化 + connect(qApp, &QApplication::paletteChanged, this, [=]() { + update(); + }); } SearchLineEdit::~SearchLineEdit() { diff --git a/frontend/control/stack-pages/search-result-page.cpp b/frontend/control/stack-pages/search-result-page.cpp index 78b2333..028ce87 100644 --- a/frontend/control/stack-pages/search-result-page.cpp +++ b/frontend/control/stack-pages/search-result-page.cpp @@ -173,6 +173,10 @@ void SearchResultPage::initConnections() sendResizeWidthSignal(280); }); connect(this, &SearchResultPage::setSelectionInfo, m_resultArea, &ResultArea::setSelectionInfo); + //跟随主题透明度变化 + connect(qApp, &QApplication::paletteChanged, this, [=]() { + update(); + }); } void SearchResultPage::setupConnectionsForWidget(ResultWidget *widget)