GNOME Bugzilla – Bug 758352
cropping is broken on HiDpi screens?
Last modified: 2015-12-04 11:01:10 UTC
Cropping works really weird for me, and I first thought it was a wayland problem, but it appears under X as well. The initial area is way to big, and there is an area to the left where the cropping box refuses to go, so maybe it miscalculates somehow? Might be the hidpi-thing that does it? Not sure.
Created attachment 315905 [details] screenshot
This is known. :) It's due to HiDpi. I wrote the code on a LoDpi system and didn't want to complicate things by involving HiDpi-correctness. The bug arises from places where cairo drawing meets raw image pixels. We need to sprinkle some divisions and multiplications by the scale factor.
Created attachment 316715 [details] [review] gegl-gtk-view, gegl-gtk-view-helper, tool-crop: Rename scale to zoom
Created attachment 316716 [details] [review] gegl-gtk-view-helper: Clean up
Created attachment 316717 [details] [review] gegl-gtk-view-helper, tool-crop: Fix cropping on HiDpi
Created attachment 316719 [details] screenshot Seems to work fine in general. Is original size supposed to only be in the middle of the whole image though?
Just want to make sure that's the intended behaviour, and not something it miscalculates.
(In reply to Andreas Nilsson from comment #6) > Seems to work fine in general. > Is original size supposed to only be in the middle of the whole image though? When you select the tool for the first time, it is supposed to place the crop area in the middle. If you resize/move it, then move to a different tool, and then come back to 'crop', then the area should be marked as you had left it. It shouldn't just go back to the centre. It seems to work like that for me. There is a bug (both in Lo and HiDpi) where if you reset the tool and re-open it, then the crop area is not in the middle, but spans the entire image.
Ah, OK. Just wanted to make sure it's consistent across lo- and hidpi.
Created attachment 316762 [details] [review] gegl-gtk-view-helper, tool-crop: Fix cropping on HiDpi We don't need to multiply the dimensions of the crop tool's surface by the scale factor. gdk_window_create_similar_surface takes care of it.