diff options
-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*); |