revert: remove close window animation
This commit is contained in:
@@ -64,23 +64,6 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
|
|
||||||
m_pm->setAutoLoadFilterSuffixes(supportedImageFormats());
|
m_pm->setAutoLoadFilterSuffixes(supportedImageFormats());
|
||||||
|
|
||||||
m_fadeOutAnimation = new QPropertyAnimation(this, "windowOpacity"_ba);
|
|
||||||
m_fadeOutAnimation->setDuration(300);
|
|
||||||
m_fadeOutAnimation->setStartValue(1);
|
|
||||||
m_fadeOutAnimation->setEndValue(0);
|
|
||||||
m_floatUpAnimation = new QPropertyAnimation(this, "geometry"_ba);
|
|
||||||
m_floatUpAnimation->setDuration(300);
|
|
||||||
m_floatUpAnimation->setEasingCurve(QEasingCurve::OutCirc);
|
|
||||||
m_exitAnimationGroup = new QParallelAnimationGroup(this);
|
|
||||||
m_exitAnimationGroup->addAnimation(m_fadeOutAnimation);
|
|
||||||
m_exitAnimationGroup->addAnimation(m_floatUpAnimation);
|
|
||||||
connect(m_exitAnimationGroup, &QParallelAnimationGroup::finished,
|
|
||||||
#ifdef Q_OS_MAC
|
|
||||||
this, &QWidget::hide);
|
|
||||||
#else
|
|
||||||
this, &QWidget::close);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
GraphicsScene * scene = new GraphicsScene(this);
|
GraphicsScene * scene = new GraphicsScene(this);
|
||||||
|
|
||||||
m_graphicsView = new GraphicsView(this);
|
m_graphicsView = new GraphicsView(this);
|
||||||
@@ -579,12 +562,6 @@ void MainWindow::centerWindow()
|
|||||||
|
|
||||||
void MainWindow::closeWindow()
|
void MainWindow::closeWindow()
|
||||||
{
|
{
|
||||||
QRect windowRect(this->geometry());
|
|
||||||
m_floatUpAnimation->setStartValue(windowRect);
|
|
||||||
m_floatUpAnimation->setEndValue(windowRect.adjusted(0, -80, 0, 0));
|
|
||||||
m_floatUpAnimation->setStartValue(QRect(this->geometry().x(), this->geometry().y(), this->geometry().width(), this->geometry().height()));
|
|
||||||
m_floatUpAnimation->setEndValue(QRect(this->geometry().x(), this->geometry().y()-80, this->geometry().width(), this->geometry().height()));
|
|
||||||
m_exitAnimationGroup->start();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::updateWidgetsPosition()
|
void MainWindow::updateWidgetsPosition()
|
||||||
|
|||||||
@@ -115,9 +115,6 @@ private:
|
|||||||
PlaylistManager *m_pm;
|
PlaylistManager *m_pm;
|
||||||
|
|
||||||
QPoint m_oldMousePos;
|
QPoint m_oldMousePos;
|
||||||
QPropertyAnimation *m_fadeOutAnimation;
|
|
||||||
QPropertyAnimation *m_floatUpAnimation;
|
|
||||||
QParallelAnimationGroup *m_exitAnimationGroup;
|
|
||||||
QFileSystemWatcher *m_fileSystemWatcher;
|
QFileSystemWatcher *m_fileSystemWatcher;
|
||||||
ToolButton *m_prevButton;
|
ToolButton *m_prevButton;
|
||||||
ToolButton *m_nextButton;
|
ToolButton *m_nextButton;
|
||||||
|
|||||||
Reference in New Issue
Block a user