Consider the scale ratio when scaling down images

fixes #393
This commit is contained in:
Konstantinos Sideris 2018-08-01 21:10:03 +03:00
parent 1f50d13b9f
commit b5b5faa5ec
5 changed files with 37 additions and 31 deletions

View file

@ -68,7 +68,7 @@ ImageOverlay::paintEvent(QPaintEvent *event)
int max_width = screen_.width() - 2 * outer_margin;
int max_height = screen_.height();
image_ = utils::scaleDown<QPixmap>(max_width, max_height, originalImage_);
image_ = utils::scaleDown(max_width, max_height, originalImage_);
int diff_x = max_width - image_.width();
int diff_y = max_height - image_.height();