From e5750da491a176181655a1603dbc017718897e10 Mon Sep 17 00:00:00 2001 From: SimplestStudio Date: Fri, 22 Dec 2023 13:28:27 +0200 Subject: [PATCH] [win-linux] fix bug 65660 --- win-linux/src/components/cdownloadwidget.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/win-linux/src/components/cdownloadwidget.cpp b/win-linux/src/components/cdownloadwidget.cpp index 2513c6ec4..a1f2c1268 100644 --- a/win-linux/src/components/cdownloadwidget.cpp +++ b/win-linux/src/components/cdownloadwidget.cpp @@ -205,6 +205,10 @@ CDownloadWidget::CDownloadWidget(QWidget *parent) m_pToolButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); m_pToolButton->setVisible(false); connect(m_pToolButton, &QPushButton::clicked, this, [=]() { + if (isVisible()) { + hide(); + return; + } polish(); show(); QPoint pos = AscAppManager::isRtlEnabled() ? parent->geometry().topLeft() : parent->geometry().topRight() - QPoint(WIDGET_MAX_WIDTH, 0); @@ -427,7 +431,7 @@ bool CDownloadWidget::eventFilter(QObject *obj, QEvent *ev) { switch (ev->type()) { case QEvent::WindowDeactivate: - if (obj == this) + if (obj == this && !m_pToolButton->underMouse()) hide(); break; case QEvent::HoverEnter: