aboutsummaryrefslogtreecommitdiff
path: root/pageitem.cc
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2020-04-12 00:45:32 +0200
committerJavier <dev.git@javispedro.com>2020-04-12 01:24:39 +0200
commit5cb277888995edecfafd83fed4cf2bd510052a4b (patch)
tree9c94054e59035eece0e34e8be10ee77769b1d9e4 /pageitem.cc
parent7f3d796c50b1855e690f74b35fd35798142ceb35 (diff)
downloadscribiu-5cb277888995edecfafd83fed4cf2bd510052a4b.tar.gz
scribiu-5cb277888995edecfafd83fed4cf2bd510052a4b.zip
port to qt5, libusb 1.0, and openobex 1.7
Diffstat (limited to 'pageitem.cc')
-rw-r--r--pageitem.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/pageitem.cc b/pageitem.cc
index 09c84ae..b5be4cf 100644
--- a/pageitem.cc
+++ b/pageitem.cc
@@ -35,7 +35,7 @@ PageItem::PageItem(AfdNotebook *nb, PaperReplay *replay, int pageNum, QGraphicsI
bg->setShapeMode(QGraphicsPixmapItem::BoundingRectShape);
bg->setTransformationMode(Qt::SmoothTransformation);
QRectF bgRect = bg->boundingRect();
- bg->scale(_pageTrim.width() / bgRect.width(), _pageTrim.height() / bgRect.height());
+ bg->setScale(std::min(_pageTrim.width() / bgRect.width(), _pageTrim.height() / bgRect.height()));
bg->setPos(_pageTrim.topLeft());
}