From 380385d86f636ce78cb0187e92db6a351f196e4f Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Sun, 8 Jun 2014 13:40:19 -0300 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-ui/profile/divepixmapitem.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'qt-ui/profile') 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) -- cgit v1.2.3-70-g09d2