summary refs log tree commit diff
path: root/src/timeline
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-08-01 21:10:03 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-08-01 21:10:03 +0300
commitb5b5faa5eceba4c5ad0508cc0c079e6bad73b025 (patch)
treecf20ce75dc864f1a12d24574f894c69125ca4057 /src/timeline
parentAdd install instructions for macOS (#395) (diff)
downloadnheko-b5b5faa5eceba4c5ad0508cc0c079e6bad73b025.tar.xz
Consider the scale ratio when scaling down images
fixes #393
Diffstat (limited to 'src/timeline')
-rw-r--r--src/timeline/widgets/ImageItem.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/timeline/widgets/ImageItem.cpp b/src/timeline/widgets/ImageItem.cpp

index 19b445db..b66b82ae 100644 --- a/src/timeline/widgets/ImageItem.cpp +++ b/src/timeline/widgets/ImageItem.cpp
@@ -126,7 +126,7 @@ void ImageItem::setImage(const QPixmap &image) { image_ = image; - scaled_image_ = utils::scaleDown<QPixmap>(max_width_, max_height_, image_); + scaled_image_ = utils::scaleDown(max_width_, max_height_, image_); width_ = scaled_image_.width(); height_ = scaled_image_.height(); @@ -165,7 +165,7 @@ ImageItem::resizeEvent(QResizeEvent *event) if (!image_) return QWidget::resizeEvent(event); - scaled_image_ = utils::scaleDown<QPixmap>(max_width_, max_height_, image_); + scaled_image_ = utils::scaleDown(max_width_, max_height_, image_); width_ = scaled_image_.width(); height_ = scaled_image_.height();