mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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
1 changed files with 6 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue