Changeset View
Changeset View
Standalone View
Standalone View
lib/documentview/documentviewcontainer.cpp
Context not available. | |||||
36 | #include <QTimer> | 36 | #include <QTimer> | ||
---|---|---|---|---|---|
37 | #include <QDebug> | 37 | #include <QDebug> | ||
38 | #include <QtMath> | 38 | #include <QtMath> | ||
39 | #include <QStyle> | ||||
39 | 40 | | |||
40 | namespace Gwenview | 41 | namespace Gwenview | ||
41 | { | 42 | { | ||
Context not available. | |||||
271 | if (animated) { | 272 | if (animated) { | ||
272 | Q_FOREACH(DocumentView* view, d->mRemovedViews) { | 273 | Q_FOREACH(DocumentView* view, d->mRemovedViews) { | ||
273 | view->fadeOut(); | 274 | view->fadeOut(); | ||
274 | QTimer::singleShot(DocumentView::AnimDuration, view, SLOT(deleteLater())); | 275 | int animDuration = style()->styleHint(QStyle::SH_Widget_Animation_Duration, nullptr, this); | ||
276 | QTimer::singleShot(animDuration, view, SLOT(deleteLater())); | ||||
275 | } | 277 | } | ||
276 | } else { | 278 | } else { | ||
277 | Q_FOREACH(DocumentView* view, d->mRemovedViews) { | 279 | Q_FOREACH(DocumentView* view, d->mRemovedViews) { | ||
Context not available. |