summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2020-01-18 17:09:10 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2020-01-18 17:09:10 +0100
commitea09ea1009f4de52ecd0f6df9a8597e62ae1ca5a (patch)
treedfd3cfb09d487af6be9b817bae6979531c1a0995 /examples
parented0c443253bf33152f8a54a0d60d3a9bf6788ae8 (diff)
Use visible size information when copying macOS image from clipboard.
Diffstat (limited to 'examples')
-rw-r--r--examples/clipboard.cxx2
1 files changed, 1 insertions, 1 deletions
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());