mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-07-10 23:55:58 +08:00
fix: ISSUE #I66N4Y 关闭动画播放时快速按Alt+F4可反复关闭动画而关不掉商店
动画执行标志位仅在动画结束后被置为不再执行,需要提前 Log: 修改 BaseWidgetOpacity::closeEvent,动画开始执行就修改标志位
This commit is contained in:
parent
27c95991c5
commit
ba331cb3fb
@ -13,6 +13,8 @@ BaseWidgetOpacity::BaseWidgetOpacity(QWidget *parent) : DBlurEffectWidget(parent
|
||||
void BaseWidgetOpacity::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
if (!closeWindowAnimation) {
|
||||
closeWindowAnimation = true;
|
||||
|
||||
QPropertyAnimation *animation = new QPropertyAnimation(this, "windowOpacity");
|
||||
animation->setEasingCurve(QEasingCurve::OutQuart);
|
||||
animation->setDuration(500);
|
||||
@ -25,7 +27,6 @@ void BaseWidgetOpacity::closeEvent(QCloseEvent *event)
|
||||
});
|
||||
|
||||
QObject::connect(animation, &QPropertyAnimation::finished, this, [=](){
|
||||
closeWindowAnimation = true;
|
||||
this->close();
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user