SUMMARY When desktop scaling is used (Plasma desktop, set via the Displays section of System Settings, on a HiDPI display), the After images of previews in the Image Editor are scaled differently to the Before images STEPS TO REPRODUCE 1. Set desktop scaling (eg: to 1.5) and logout/login to apply 2. Open an image in Digikam in the Image Editor (Tools -> Image Editor) 3. Select White Balance (for example) from the Colours menu 4. Move the mouse to the control pane (to cause the After image to be displayed) OBSERVED RESULT The image appears larger (2x?) when the mouse is over the control pane (After image) than when it is over the image itself (Before image). The Before image has the same scaling as when no tool is selected. EXPECTED RESULT The image is scaled the same amount in both cases. SOFTWARE/OS VERSIONS Linux/KDE Plasma: (available in About System) KDE Plasma Version: 5.16.5 KDE Frameworks Version: 5.62.0 Qt Version: 5.13.1 ADDITIONAL INFORMATION I also tried compiling the latest master (both Frameworks and DigiKam), and the issue was still there. When I use a non-hidpi monitor and disable scaling, the problem goes away.
Created attachment 122738 [details] Image with no tool open
Created attachment 122739 [details] Image in "before" state
Created attachment 122740 [details] Image in "after" state All screenshots scaled to 50% to keep the file size down
If I get the time, I will attempt to figure out the code and submit a patch, but I thought a bug report would be useful to have in case other people are experiencing the same issue.
You use the white balance plugin where the code is located here and it use ImageRegionWidget to render the canvas : https://invent.kde.org/kde/digikam/blob/master/core/dplugins/editor/colors/whitebalance/whitebalancetool.cpp#L93 Code from this widget is common to plenty of Editor tools. Code is here : https://invent.kde.org/kde/digikam/blob/master/core/utilities/imageeditor/widgets/imageregionwidget.cpp#L82 It's based on Qt GraphicView and use this item implementation to render contents on the canvas with paint() and paintExtraData() : https://invent.kde.org/kde/digikam/blob/master/core/utilities/imageeditor/widgets/imageregionitem.cpp#L111 https://invent.kde.org/kde/digikam/blob/master/core/utilities/imageeditor/widgets/imageregionitem.cpp#L188 This last method draw the preview modes "before/after/mouse-over"... Gilles Caulier
Git commit deaebf4a60780c01d8c0f5e320db3bb0488526be by Maik Qualmann. Committed on 20/09/2019 at 10:45. Pushed by mqualmann into branch 'master'. fix use correct zoom value dependent on device pixel ratio FIXED-IN: 6.4.0 M +2 -1 NEWS M +5 -0 core/libs/widgets/graphicsview/imagezoomsettings.cpp M +3 -0 core/libs/widgets/graphicsview/imagezoomsettings.h M +10 -0 core/libs/widgets/graphicsview/previewlayout.cpp M +1 -0 core/libs/widgets/graphicsview/previewlayout.h M +8 -6 core/utilities/imageeditor/widgets/canvas.cpp M +1 -1 core/utilities/imageeditor/widgets/imageregionwidget.cpp https://invent.kde.org/kde/digikam/commit/deaebf4a60780c01d8c0f5e320db3bb0488526be
There are a few small things where we need to use the real zoom factor, I fix it tonight. Maik
Git commit 38c1209c7fcce424d843f3508db6bc8cc39f08a8 by Maik Qualmann. Committed on 20/09/2019 at 17:20. Pushed by mqualmann into branch 'master'. fix get capture points M +2 -2 core/utilities/imageeditor/widgets/imageregionitem.cpp M +2 -2 core/utilities/imageeditor/widgets/imageregionwidget.cpp https://invent.kde.org/kde/digikam/commit/38c1209c7fcce424d843f3508db6bc8cc39f08a8
*** Bug 412920 has been marked as a duplicate of this bug. ***