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>
This commit is contained in:
parent
c21122af40
commit
380385d86f
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user