GNOME Bugzilla – Bug 613909
Image preview in Nautilus file selection spreads beyond dialogue box
Last modified: 2010-10-13 14:23:37 UTC
When selecting a large image in Nautilus, the image preview spreads beyond the boundaries of the dialogue box, gets the dialogue box to expand beyond the screen thus making the control unreachable. Steps to reproduce 1. Open Nautilus 2. Go to "Edit -> Background and Emblems..." 3. Click on the "Add a new pattern" 4. Navigate to a directory with a large image (preferably larger than the screen) 5. Select the image Actual behaviour The image spreads beyond the limits of the dialogue box and pushes all controls out of the screen area. Expected behaviour The image should be scaled or cropped so that all controls fit in the dialogue box. Example screenshot: http://img62.imageshack.us/img62/3736/pantallazo1i.png See the original bug filed on Ubuntu Launchpad: https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/534589
This bug is still in Nautilus 2.30.0
Created attachment 157427 [details] [review] one-liner
Review of attachment 157427 [details] [review]: I'd rather apply a slightly more complex logic here, as your patch doesn't take into account these cases: - the image is smaller in width than 128px; it will be upscaled, which will make it look bad - the image is small in height (e.g. 64px) but tall in width (like 800px), so scaling it to a width of 128px will make it even bigger You could for instance fix two boundaries for size (i.e. 256px in height and 128px in width), use gdk_pixbuf_new_from_file() and then scale it manually to the correct size in the dimension that exceeds the boundary.
*** Bug 620998 has been marked as a duplicate of this bug. ***
This is not an issue anymore now that 'Background and Emblems' have been removed from Nautilus.