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

correct screenshot tooltip

fix #2267
This commit is contained in:
PKev 2015-09-22 12:51:46 +03:00
parent 7cec81d764
commit a14d917703
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;
}; };