summary refs log tree commit diff
path: root/src/timeline/widgets
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-02-19 23:33:11 +0200
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-02-19 23:33:11 +0200
commit127c52e39a5455d574fcbffd75753b31897e4877 (patch)
tree16847e445836393906136dde4f5fb830034d6612 /src/timeline/widgets
parentMove scaleImage() in Utils (diff)
downloadnheko-127c52e39a5455d574fcbffd75753b31897e4877.tar.xz
Scale down the preview image to fit in the application window
On macOS the modal has some extra space around the main content
that might make it unusable with a big enough image.
Diffstat (limited to 'src/timeline/widgets')
-rw-r--r--src/timeline/widgets/ImageItem.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/timeline/widgets/ImageItem.cc b/src/timeline/widgets/ImageItem.cc

index 591d4e7b..08a057da 100644 --- a/src/timeline/widgets/ImageItem.cc +++ b/src/timeline/widgets/ImageItem.cc
@@ -150,8 +150,9 @@ ImageItem::mousePressEvent(QMouseEvent *event) if (textRegion_.contains(event->pos())) { openUrl(); } else { - auto image_dialog = new dialogs::ImageOverlay(image_, this); - image_dialog->show(); + image_dialog_ = + QSharedPointer<dialogs::ImageOverlay>(new dialogs::ImageOverlay(image_, this)); + image_dialog_->show(); } }