site  contact  subhomenews

Partview fix window width

April 11, 2026 — BarryK

Forum member don570 reported the problem:

https://forum.puppylinux.com/viewtopic.php?t=16702

gtkdialog does not estimate the width of the svg image correctly, and the right-side is slightly truncated.

I found a fix, using inkscape in CLI mode, which does calculate the correct width. Put this into /usr/sbin/partview:

W1=$(inkscape --query-width /tmp/partview_display_svg | cut -f 1 -d '.')
sed -i -e "s%^<svg%<svg width=\"${W1}\" %" /tmp/partview_display_svg

...that is inserting a "width=" parameter into the "<svg" tag. Works great:

img1

...previously, the "1307.00G" had the "G" half-cut off. If anything, the window is now a bit wider than required.   

Tags: easy