summaryrefslogtreecommitdiffstats
path: root/qt-ui/profile
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-06-08 13:40:19 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-06-08 12:42:51 -0700
commit380385d86f636ce78cb0187e92db6a351f196e4f (patch)
tree13cd622f391be55fe5a8b85218f95b0358041a93 /qt-ui/profile
parentc21122af402579588eaa6ed0ea05849a5346fe10 (diff)
downloadsubsurface-380385d86f636ce78cb0187e92db6a351f196e4f.tar.gz
Rotate the picture around -4 and 4 degrees.
This patch rotates the picture a bit, so it looks like it was splattered around the profile. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile')
-rw-r--r--qt-ui/profile/divepixmapitem.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/qt-ui/profile/divepixmapitem.cpp b/qt-ui/profile/divepixmapitem.cpp
index 4405195da..c0eeb8454 100644
--- a/qt-ui/profile/divepixmapitem.cpp
+++ b/qt-ui/profile/divepixmapitem.cpp
@@ -33,6 +33,12 @@ void DivePictureItem::setPixmap(const QPixmap &pix)
shadow->setZValue(-2);
setTransformOriginPoint(boundingRect().width()/2, boundingRect().height()/2);
+
+ qreal angle = qrand() % 5;
+ if (rand() % 2)
+ angle *= -1;
+
+ setRotation(angle);
}
void DivePictureItem::hoverEnterEvent(QGraphicsSceneHoverEvent *event)