From ea09ea1009f4de52ecd0f6df9a8597e62ae1ca5a Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Sat, 18 Jan 2020 17:09:10 +0100 Subject: Use visible size information when copying macOS image from clipboard. --- examples/clipboard.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/clipboard.cxx b/examples/clipboard.cxx index 5859e5c58..bb0a62d0e 100644 --- a/examples/clipboard.cxx +++ b/examples/clipboard.cxx @@ -98,7 +98,7 @@ public: #endif Fl_Image *oldimg = image_box->image(); delete oldimg; - im->scale(image_box->w(), image_box->h()); + if (im->w() > image_box->w() || im->h() > image_box->h()) im->scale(image_box->w(), image_box->h()); image_box->image(im); // show the scaled image image_size->copy_label(title); value(image_box->parent()); -- cgit v1.2.3