解决结果列表点击收起按钮时位置错误的问题。(上次的提交未完全解决)

This commit is contained in:
iaom 2022-06-23 21:20:49 +08:00
parent 9741064e33
commit 0c2d8977a1
1 changed files with 3 additions and 3 deletions

View File

@ -458,12 +458,13 @@ void ResultArea::initConnections()
connect(this->m_titleLabel, &TitleLabel::retractClicked, this, [=] () {
Q_FOREACH(auto widget, m_widget_list) {
if (widget->pluginName() == m_titleLabel->text()) {
widget->reduceListSlot();
widget->resetTitleLabel();
if (!m_titleLabel->isHidden()) {
m_titleLabel->hide();
this->setViewportMargins(0,0,0,0);
}
widget->reduceListSlot();
this->verticalScrollBar()->setValue(widget->pos().ry());
widget->resetTitleLabel();
}
}
});
@ -511,7 +512,6 @@ void ResultArea::setupConnectionsForWidget(ResultWidget *widget)
connect(widget, &ResultWidget::retractClicked, this, [=] () {//点击收起搜索结果后
if (!m_titleLabel->isHidden()) {
this->setViewportMargins(0,0,0,0);
this->verticalScrollBar()->setValue(widget->pos().ry());
m_titleLabel->hide();
}
});