diff --git a/cockatrice/src/carditem.cpp b/cockatrice/src/carditem.cpp index cb0bcea5..be449fb9 100644 --- a/cockatrice/src/carditem.cpp +++ b/cockatrice/src/carditem.cpp @@ -364,11 +364,11 @@ void CardItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) bool CardItem::animationEvent() { - int delta = DELTA; + int rotation = ROTATION_DEGREES_PER_FRAME; if (!tapped) - delta *= -1; + rotation *= -1; - tapAngle += delta; + tapAngle += rotation; setTransform(QTransform().translate(CARD_WIDTH_HALF, CARD_HEIGHT_HALF).rotate(tapAngle).translate(-CARD_WIDTH_HALF, -CARD_HEIGHT_HALF)); setHovered(false); diff --git a/cockatrice/src/carditem.h b/cockatrice/src/carditem.h index c9cbaefc..524c1695 100644 --- a/cockatrice/src/carditem.h +++ b/cockatrice/src/carditem.h @@ -14,8 +14,7 @@ class QColor; const int MAX_COUNTERS_ON_CARD = 999; const float CARD_WIDTH_HALF = CARD_WIDTH / 2; const float CARD_HEIGHT_HALF = CARD_HEIGHT / 2; -// DELTA is the degrees of rotation that will animate between frames -const int DELTA = 10; +const int ROTATION_DEGREES_PER_FRAME = 10; class CardItem : public AbstractCardItem { Q_OBJECT