Bug 388930 - Image cropping UI broken
Summary: Image cropping UI broken
Status: RESOLVED FIXED
Alias: None
Product: calligracommon
Classification: Applications
Component: flake-picture (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Calligra Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-13 22:15 UTC by sebpe
Modified: 2018-01-24 18:50 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 3.1.0
Sentry Crash Report:


Attachments
gray shape covering the image cropping preview at the bottom left (477.25 KB, image/png)
2018-01-13 22:15 UTC, sebpe
Details
gray shape covering parts of the image cropping preview (439.57 KB, image/png)
2018-01-13 22:21 UTC, sebpe
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sebpe 2018-01-13 22:15:05 UTC
Created attachment 109845 [details]
gray shape covering the image cropping preview at the bottom left

The Image Cropping UI on the "Picture editing" Tab of the general docker shows some opaque grey shape instead of the the cropping borders.
Until the Top, Bottom, Left and Right cropping borders are not set to some larger value using the spin boxes above, the shape will cover the entire image preview.
Setting the cropping with the mouse still works but you have to spot the handles blindly.

Steps to reproduce:
 - open an empty document in words
 - insert an image
 - go to the "Picture editing" tab
 - change the values of the Top, Bottom, Left and Right spin boxes

I can always reproduce this within words, sheets, stage and karbon using arch (recent git-master) and (K)ubuntu (3.0.1).
Comment 1 sebpe 2018-01-13 22:19:03 UTC
Attachment description should be "gray shape covering the image cropping preview at the bottom right"
Comment 2 sebpe 2018-01-13 22:21:27 UTC
Created attachment 109846 [details]
gray shape covering parts of the image cropping preview
Comment 3 Dag Andersen 2018-01-24 18:50:23 UTC
Git commit 307f940655583b5a0efbfffc6460b66bb51a2e5e by Dag Andersen.
Committed on 24/01/2018 at 18:47.
Pushed by danders into branch 'master'.

Paint crop rectangle and its handles with 1px wide outline.

Due to the painter scaling the pen width (1 by default) was scaled too, which caused the outlines to cover the whole image.

This patch sets the pen width to 0 which always results in a 1px wide line, unfortunately also on HiDPI-Displays.
Using a pen width of 1 and changing everything to work with absolute coordinates to fix that seemed a little cumbersome, so I added a dark overlay for the cropped region to improve visibility instead.

Patch by Sebastian Pettke.
FIXED-IN: 3.1.0

M  +8    -1    plugins/pictureshape/CropWidget.cpp

https://commits.kde.org/calligra/307f940655583b5a0efbfffc6460b66bb51a2e5e