SUMMARY In the viewer window, if one uses any zoom operation on the image display, the color changes from gray to black. STEPS TO REPRODUCE 1. Open kphotoalbum --demo 2. Go to thumbnail view 3. Double-click an image to open the viewer 4. Press a shortcut associated with a zoom operation (+,-,=,.) OBSERVED RESULT The image is zoomed correctly, but the margins between the image and the viewer window border / screen border changes from dark gray to black. EXPECTED RESULT The background color should be preserved. ADDITIONAL INFORMATION Can be reproduced every time, can be reproduced using the demo database.
Git commit 0883c80af5d5d545c13d7e707cac362456073ec1 by Johannes Zarl-Zierl. Committed on 24/12/2023 at 00:14. Pushed by johanneszarl into branch 'master'. Use the correct background color in viewer for zoomed images When zooming in the viewer window, such that there is a border outside of the image itself, that border was until now drawn black instead of the QPalette::base() color. The reason for this is that the zoomed image is actually a copy of the loaded image with those borders. Adding an alpha channel to the image fixes the issue. It would possibly be a better fix to draw a scaled image in ImageDisplay::paintEvent instead, but that would be a major rewrite of the ImageDisplay code. M +1 -0 CHANGELOG.md M +4 -1 Viewer/ImageDisplay.cpp https://invent.kde.org/graphics/kphotoalbum/-/commit/0883c80af5d5d545c13d7e707cac362456073ec1