From a14d917703a1886e15e91fa9e679a67bb7166c03 Mon Sep 17 00:00:00 2001 From: PKev Date: Tue, 22 Sep 2015 12:51:46 +0300 Subject: [PATCH] correct screenshot tooltip fix #2267 --- src/widget/tool/toolboxgraphicsitem.cpp | 6 +++--- src/widget/tool/toolboxgraphicsitem.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/widget/tool/toolboxgraphicsitem.cpp b/src/widget/tool/toolboxgraphicsitem.cpp index 890381053..11d43cb87 100644 --- a/src/widget/tool/toolboxgraphicsitem.cpp +++ b/src/widget/tool/toolboxgraphicsitem.cpp @@ -29,7 +29,7 @@ ToolBoxGraphicsItem::ToolBoxGraphicsItem() this->opacityAnimation->setKeyValueAt(1, this->activeOpacity); this->opacityAnimation->setDuration(this->fadeTimeMs); - setOpacity(this->idleOpacity); + setOpacity(this->activeOpacity); } ToolBoxGraphicsItem::~ToolBoxGraphicsItem() @@ -39,13 +39,13 @@ ToolBoxGraphicsItem::~ToolBoxGraphicsItem() void ToolBoxGraphicsItem::hoverEnterEvent(QGraphicsSceneHoverEvent* event) { - startAnimation(QAbstractAnimation::Forward); + startAnimation(QAbstractAnimation::Backward); QGraphicsItemGroup::hoverEnterEvent(event); } void ToolBoxGraphicsItem::hoverLeaveEvent(QGraphicsSceneHoverEvent* event) { - startAnimation(QAbstractAnimation::Backward); + startAnimation(QAbstractAnimation::Forward); QGraphicsItemGroup::hoverLeaveEvent(event); } diff --git a/src/widget/tool/toolboxgraphicsitem.h b/src/widget/tool/toolboxgraphicsitem.h index 7c7776855..7c87289b4 100644 --- a/src/widget/tool/toolboxgraphicsitem.h +++ b/src/widget/tool/toolboxgraphicsitem.h @@ -43,7 +43,7 @@ private: void startAnimation(QAbstractAnimation::Direction direction); QPropertyAnimation* opacityAnimation; - qreal idleOpacity = 0.7f; + qreal idleOpacity = 0.0f; qreal activeOpacity = 1.0f; int fadeTimeMs = 300; };