added some dank tab animations

This commit is contained in:
fourtf
2017-01-26 05:26:21 +01:00
parent 700c756f5a
commit 4b2ddb0bbb
7 changed files with 53 additions and 35 deletions
+11 -3
View File
@@ -66,7 +66,14 @@ public:
repaint();
}
void moveAnimated(QPoint pos);
void moveAnimated(QPoint pos, bool animated = true);
public:
QRect
getDesiredRect() const
{
return QRect(posAnimationDesired, this->size());
}
protected:
void paintEvent(QPaintEvent *) override;
@@ -81,8 +88,9 @@ protected:
void mouseMoveEvent(QMouseEvent *event) override;
private:
// QPropertyAnimation posAnimation;
// bool posAnimated;
QPropertyAnimation posAnimation;
bool posAnimated;
QPoint posAnimationDesired;
Notebook *notebook;