diff options
author | Ken Moore <ken@ixsystems.com> | 2017-06-29 14:46:57 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-06-29 14:46:57 -0400 |
commit | e0e184fab30995de316bb6c9bb111785ad9d4f6b (patch) | |
tree | d15a11fe622dcc06d49a656c2f78bbe98c948880 /src-qt5/core | |
parent | Some more fixes for the window animations (diff) | |
download | lumina-e0e184fab30995de316bb6c9bb111785ad9d4f6b.tar.gz lumina-e0e184fab30995de316bb6c9bb111785ad9d4f6b.tar.bz2 lumina-e0e184fab30995de316bb6c9bb111785ad9d4f6b.zip |
Add an animation finished routine so we can re-load any Window settings which are ignored during the animation.
Diffstat (limited to 'src-qt5/core')
-rw-r--r-- | src-qt5/core/libLumina/RootSubWindow.cpp | 8 | ||||
-rw-r--r-- | src-qt5/core/libLumina/RootSubWindow.h | 1 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src-qt5/core/libLumina/RootSubWindow.cpp b/src-qt5/core/libLumina/RootSubWindow.cpp index 80d5c82b..d5a2795d 100644 --- a/src-qt5/core/libLumina/RootSubWindow.cpp +++ b/src-qt5/core/libLumina/RootSubWindow.cpp @@ -139,6 +139,7 @@ void RootSubWindow::initWindowFrame(){ anim = new QPropertyAnimation(this); anim->setTargetObject(this); anim->setDuration(200); //1/5 second (appx) + connect(anim, SIGNAL(finished()), this, SLOT(animFinished()) ); titleLabel = new QLabel(this); titleLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); otherM = new QMenu(this); //menu of other actions @@ -258,8 +259,6 @@ void RootSubWindow::startResizing(){ } - - // === PRIVATE SLOTS === void RootSubWindow::propertiesChanged(QList<NativeWindow::Property> props, QList<QVariant> vals){ for(int i=0; i<props.length() && i<vals.length(); i++){ @@ -325,6 +324,11 @@ void RootSubWindow::propertiesChanged(QList<NativeWindow::Property> props, QList } } +void RootSubWindow::animFinished(){ + if(anim->propertyName()=="geometry"){ this->setGeometry(this->geometry()); } //make sure to send one more resize/move event + +} + // === PROTECTED === void RootSubWindow::mousePressEvent(QMouseEvent *ev){ //qDebug() << "Frame Mouse Press Event"; diff --git a/src-qt5/core/libLumina/RootSubWindow.h b/src-qt5/core/libLumina/RootSubWindow.h index 5e291aa3..25c6596a 100644 --- a/src-qt5/core/libLumina/RootSubWindow.h +++ b/src-qt5/core/libLumina/RootSubWindow.h @@ -71,6 +71,7 @@ public slots: private slots: void propertiesChanged(QList<NativeWindow::Property>, QList<QVariant>); + void animFinished(); protected: void mousePressEvent(QMouseEvent*); |