From b9cfd2b2b7008f4f5a8ac7bd0fc5cb89875cfde0 Mon Sep 17 00:00:00 2001 From: JunjieBai Date: Wed, 6 Sep 2023 15:45:47 +0800 Subject: [PATCH] =?UTF-8?q?Fix(frontend):=E5=B1=95=E5=BC=80=E6=94=B6?= =?UTF-8?q?=E8=B5=B7=E6=8C=89=E9=92=AE=E5=81=B6=E5=B0=94=E4=BC=9A=E8=A2=AB?= =?UTF-8?q?=E9=81=AE=E6=8C=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 当滚动条开始不存在但展开后滚动条出现时,点击详情页后触发。 由于没考虑到详情页存在的情况,滚动条出现后会将长度设置过长导致按钮被遮挡。 --- frontend/control/stack-pages/search-result-page.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/frontend/control/stack-pages/search-result-page.cpp b/frontend/control/stack-pages/search-result-page.cpp index 9f03df2..6c7fe1f 100644 --- a/frontend/control/stack-pages/search-result-page.cpp +++ b/frontend/control/stack-pages/search-result-page.cpp @@ -207,10 +207,18 @@ void SearchResultPage::initConnections() setWidth(672); }); connect(m_resultArea, &ResultArea::scrollBarAppeared, this, [ & ]{ - setWidth(672); + if (m_detailArea->isHidden()) { + setWidth(672); + } else { + setWidth(296); + } }); connect(m_resultArea, &ResultArea::scrollBarIsHideen, this, [ & ]{ - setWidth(672); + if (m_detailArea->isHidden()) { + setWidth(672); + } else { + setWidth(296); + } }); connect(m_resultArea, &ResultArea::keyPressChanged, m_detailArea, &DetailArea::setWidgetInfo); connect(m_resultArea, &ResultArea::keyPressChanged, this, [=] () {