Bug 491574

Summary: SVG thumbnails rendered with incorrect bounds
Product: [Plasma] plasmashell Reporter: Sollace <sollacea>
Component: Desktop icons & Folder View widgetAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: hein, nate
Priority: NOR    
Version: 6.0.5   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Preview of broken thumbnails
The file with the issue
Second example
Second file
Second example (side-by-side) of an svg and its preview in Dolphin

Description Sollace 2024-08-11 11:02:06 UTC
Created attachment 172503 [details]
Preview of broken thumbnails

***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY

Since updating to KDE Plasma 6 a lot of the svg files I work on have incorrect thumbnails rendered, exceptions being files that had their thumbnails already created in Plasma 5. This mainly happens with SVG files that have had their canvas sized to a particular element in Inkscape but I have a few that still exhibit this issue after resizing to all contents.

STEPS TO REPRODUCE

I can't easily reproduce it with a new file, so the best I can do is provide an example file with the issue.

OBSERVED RESULT

SVG contents are squashed horizontally and cut off to fit into the top-left quarter of the thumbnail.

EXPECTED RESULT

Thumbnail should match the intended (canvas) area of the svg


SOFTWARE/OS VERSIONS
Operating System: Manjaro Linux 
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.2
Kernel Version: 6.6.41-1-MANJARO (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION

My display scaling is 126% with Legacy applications (X11) set to "Scaled by the system" and screen tearing "allow in fullscreen windows" enabled.
Comment 1 Sollace 2024-08-11 11:03:08 UTC
Created attachment 172504 [details]
The file with the issue
Comment 2 Sollace 2024-08-11 11:10:58 UTC
To add additional context:

- I use Inkscape 0.92.5 (2060ec1f9f, 2020-04-08) for creating my SVG files (installed via bottles)
- I cannot reproduce this issue with new files created in either the same or newer versions of Inkscape
- Clicking "resize to content or selection" in either version of Inkscape has worked to fix this rendering issue in other svg files though I do not know why

This is the only file that I've been unable to fix.

Also worth noting that I have had other files that upon working on them after updating to Plasma 6 have gone from having a perfectly normal thumbnail to a broken one despite me not doing anything to change the canvas or viewbox sizes. Some of those have now intermittently switched between displaying correctly and not without me even having opened the file.
Comment 3 Sollace 2024-08-11 11:13:41 UTC
Created attachment 172505 [details]
Second example

This file was displaying correctly a few minutes ago and is now displaying broken upon going back to the folder to check. I did not open or edit the file between viewings.
Comment 4 Sollace 2024-08-11 11:14:16 UTC
Created attachment 172506 [details]
Second file
Comment 5 Sollace 2024-08-11 11:16:10 UTC
Created attachment 172507 [details]
Second example (side-by-side) of an svg and its preview in Dolphin
Comment 6 Nate Graham 2024-08-12 16:48:54 UTC

*** This bug has been marked as a duplicate of bug 448234 ***