1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Merge remote-tracking branch 'PKEv/correct_screenshot_tooltip'

This commit is contained in:
agilob 2015-09-22 21:17:02 +01:00
commit c7b5337723
No known key found for this signature in database
GPG Key ID: 296F0B764741106C
2 changed files with 4 additions and 4 deletions

View File

@ -29,7 +29,7 @@ ToolBoxGraphicsItem::ToolBoxGraphicsItem()
this->opacityAnimation->setKeyValueAt(1, this->activeOpacity); this->opacityAnimation->setKeyValueAt(1, this->activeOpacity);
this->opacityAnimation->setDuration(this->fadeTimeMs); this->opacityAnimation->setDuration(this->fadeTimeMs);
setOpacity(this->idleOpacity); setOpacity(this->activeOpacity);
} }
ToolBoxGraphicsItem::~ToolBoxGraphicsItem() ToolBoxGraphicsItem::~ToolBoxGraphicsItem()
@ -39,13 +39,13 @@ ToolBoxGraphicsItem::~ToolBoxGraphicsItem()
void ToolBoxGraphicsItem::hoverEnterEvent(QGraphicsSceneHoverEvent* event) void ToolBoxGraphicsItem::hoverEnterEvent(QGraphicsSceneHoverEvent* event)
{ {
startAnimation(QAbstractAnimation::Forward); startAnimation(QAbstractAnimation::Backward);
QGraphicsItemGroup::hoverEnterEvent(event); QGraphicsItemGroup::hoverEnterEvent(event);
} }
void ToolBoxGraphicsItem::hoverLeaveEvent(QGraphicsSceneHoverEvent* event) void ToolBoxGraphicsItem::hoverLeaveEvent(QGraphicsSceneHoverEvent* event)
{ {
startAnimation(QAbstractAnimation::Backward); startAnimation(QAbstractAnimation::Forward);
QGraphicsItemGroup::hoverLeaveEvent(event); QGraphicsItemGroup::hoverLeaveEvent(event);
} }

View File

@ -43,7 +43,7 @@ private:
void startAnimation(QAbstractAnimation::Direction direction); void startAnimation(QAbstractAnimation::Direction direction);
QPropertyAnimation* opacityAnimation; QPropertyAnimation* opacityAnimation;
qreal idleOpacity = 0.7f; qreal idleOpacity = 0.0f;
qreal activeOpacity = 1.0f; qreal activeOpacity = 1.0f;
int fadeTimeMs = 300; int fadeTimeMs = 300;
}; };