From 7b36148c052147b4716d2d83ddd8448bddcd33f6 Mon Sep 17 00:00:00 2001 From: lupoDharkael Date: Sun, 15 Apr 2018 12:59:07 +0200 Subject: [PATCH] Fix panel mouse event handling --- src/widgets/capture/utilitypanel.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/widgets/capture/utilitypanel.cpp b/src/widgets/capture/utilitypanel.cpp index 69d0a1fb..2ce901dc 100644 --- a/src/widgets/capture/utilitypanel.cpp +++ b/src/widgets/capture/utilitypanel.cpp @@ -30,6 +30,7 @@ UtilityPanel::UtilityPanel(QWidget *parent) : QWidget(parent) { initInternalPanel(); + setAttribute(Qt::WA_TransparentForMouseEvents); m_showAnimation = new QPropertyAnimation(m_internalPanel, "geometry", this); m_showAnimation->setEasingCurve(QEasingCurve::InOutQuad); @@ -57,11 +58,13 @@ void UtilityPanel::pushWidget(QWidget *w) { void UtilityPanel::toggle() { if (m_internalPanel->isHidden()) { + setAttribute(Qt::WA_TransparentForMouseEvents, false); m_showAnimation->setStartValue(QRect(-width(), 0, 0, height())); m_showAnimation->setEndValue(QRect(0, 0, width(), height())); m_internalPanel->show(); m_showAnimation->start(); } else { + setAttribute(Qt::WA_TransparentForMouseEvents); m_hideAnimation->setStartValue(QRect(0, 0, width(), height())); m_hideAnimation->setEndValue(QRect(-width(), 0, 0, height())); m_hideAnimation->start();