mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-20 00:41:23 +00:00
- Don't connect to the finished() signal in the fadeOut animation more
than once. - Stop the animation going in the opposite direction before starting a fade out/fade in animation. svn path=/trunk/KDE/kdebase/apps/; revision=1084788
This commit is contained in:
parent
80dcf48cae
commit
0ad36d8510
|
@ -150,6 +150,7 @@ ActionOverlay::ActionOverlay(AbstractItemView* parent)
|
|||
fadeOut->setProperty("startOpacity", 1);
|
||||
fadeOut->setProperty("targetOpacity", 0);
|
||||
fadeOut->setTargetWidget(this);
|
||||
connect(fadeOut, SIGNAL(finished()), SLOT(close()));
|
||||
|
||||
hide();
|
||||
}
|
||||
|
@ -185,6 +186,7 @@ void ActionOverlay::entered(const QModelIndex &index)
|
|||
show();
|
||||
if (m_hoverIndex != index) {
|
||||
m_iconToggleSelection->update();
|
||||
fadeOut->stop();
|
||||
fadeIn->start();
|
||||
}
|
||||
m_hoverIndex = index;
|
||||
|
@ -206,8 +208,8 @@ void ActionOverlay::timeout()
|
|||
m_hoverIndex = QPersistentModelIndex();
|
||||
|
||||
if (isVisible() && (fadeOut->state() != QAbstractAnimation::Running)) {
|
||||
fadeIn->stop();
|
||||
fadeOut->start();
|
||||
connect(fadeOut, SIGNAL(finished()), SLOT(close()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue