Don't draw frames and shadows around images with transparency
Summary: This patch improves and simplifies the criteria for whether or not to draw a frame and a shadow around an image's thumbnail. The old size-based detection code was unreliable and gave false positives as well as false negatives. It is replaced with a simple check for whether the image has an alpha channel, which not only automatically matches all icon files, but also non-icon raster images with transparency, which look better without the frame. BUG: 258514 FIXED-IN: 5.50 Test Plan: == PNG with no transparency == Previously most would get frames, but some wouldn't, depending on their dimensions. Now all do. Before: {F6215116} After: {F6215118} == PNG with transparency == Previously most would get frames, but some wouldn't, depending on their dimensions. There was also a bug where screenshots that includes shadows got a double shadow (one from the image itself, another from the frame-and-shadow. Now none get the frame. Before: {F6215109} After: {F6215110} Before: {F6214261} After: {F6214262} Before: {F6214955} After: {F6214956} Before: {F6214259} After: {F6214260} Before: {F6214264} After: {F6214265} == JPEG == Previously most would get frames, but some wouldn't, depending on their dimensions. Now all do. Before: {F6214939} After: {F6214940} == SVG == Previously most (but not all) icon SVGs would not get frames, but some would, depending on their dimensions. Non-icon SVGs would mostly get frames, but some would not, depending on their dimension. Now they only do if they have transparency. Before: {F6214943} After: {F6214944} Before: {F6214977} After: {F6214968} Reviewers: #frameworks, #dolphin, #vdg, broulik, cfeck, abetts Reviewed By: #vdg, broulik, abetts Subscribers: anthonyfieroni, markg, abetts, bruns, kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D15071
parent
f27ac45b
Please register or sign in to comment