Remove QPropertyAnimation from modals to work around a regression on Qt 5.10.1 (#87)

This commit is contained in:
Konstantinos Sideris 2018-02-17 18:43:40 +02:00
parent 59e4148a7c
commit fdd5051dcf
8 changed files with 18 additions and 72 deletions

View file

@ -17,11 +17,9 @@
#pragma once
#include <QGraphicsOpacityEffect>
#include <QKeyEvent>
#include <QMouseEvent>
#include <QPaintEvent>
#include <QPropertyAnimation>
#include "OverlayWidget.h"
@ -30,14 +28,6 @@ class OverlayModal : public OverlayWidget
public:
OverlayModal(QWidget *parent, QWidget *content);
void fadeIn();
void fadeOut();
void setDuration(int duration)
{
duration_ = duration;
animation_->setDuration(duration_);
};
void setColor(QColor color) { color_ = color; }
void setDismissible(bool state) { isDismissible_ = state; }
@ -48,13 +38,8 @@ protected:
private:
QWidget *content_;
int duration_;
QColor color_;
//! Decides whether or not the modal can be removed by clicking into it.
bool isDismissible_ = true;
QGraphicsOpacityEffect *opacity_;
QPropertyAnimation *animation_;
};