p-e-w / argos

Create GNOME Shell extensions in seconds
https://extensions.gnome.org/extension/1176/argos/
1.68k stars 114 forks source link

SVG Icons give error "Containers of type 'ArgosLineView' have no child property named 'y-fill'" #146

Open Naahuel opened 1 year ago

Naahuel commented 1 year ago

When using a simple script that displays an SVG icon, the GNOME shell log gets completely filled with this error, which appears every time the script runs

pop-os gnome-shell[2252]: ../clutter/clutter/clutter-container.c:768: Containers of type 'ArgosLineView' have no child property named 'y-fill'

Script example:

#!/usr/bin/env bash

echo "Temp Icon\t | imageHeight=12 image=PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCAxMzUuNDY2NjcgMTM1LjQ2NjY3JyBoZWlnaHQ9JzY0JyB3aWR0aD0nNjQnPjxkZWZzPjxtYXJrZXIgb3JpZW50PSdhdXRvJyBpZD0nYicgb3ZlcmZsb3c9J3Zpc2libGUnPjxwYXRoIGQ9J00uOTggMGExIDEgMCAxIDEtMiAwIDEgMSAwIDAgMSAyIDB6JyBmaWxsPScjZjU1JyBmaWxsLXJ1bGU9J2V2ZW5vZGQnIHN0cm9rZT0nI2Y1NScgc3Ryb2tlLXdpZHRoPScuMjY3Jy8+PC9tYXJrZXI+PG1hcmtlciBvcmllbnQ9J2F1dG8nIGlkPSdhJyBvdmVyZmxvdz0ndmlzaWJsZSc+PHBhdGggZD0nTS45OCAwYTEgMSAwIDEgMS0yIDAgMSAxIDAgMCAxIDIgMHonIGZpbGw9JyNjY2MnIGZpbGwtcnVsZT0nZXZlbm9kZCcgc3Ryb2tlPScjY2NjJyBzdHJva2Utd2lkdGg9Jy4yNjcnLz48L21hcmtlcj48L2RlZnM+PGcgc3Ryb2tlLXdpZHRoPScxNC43NzknPjxwYXRoIGQ9J002Ni4zNzggMTEyLjU5NmMuMDEzLTMxLjcyNi4wMjctNS42My4wNC05NS4yMzUnIGZpbGw9JyNjY2MnIHN0cm9rZT0nI2NjYycgc3Ryb2tlLWxpbmVjYXA9J3JvdW5kJyBtYXJrZXItc3RhcnQ9J3VybCgjYSknIHRyYW5zZm9ybT0ndHJhbnNsYXRlKC0xLjE4MiAtNC42ODcpIHNjYWxlKDEuMDM4MjQpJy8+PHBhdGggZD0nTTY2LjM3OCAxMTIuNTk2Yy4wMi0xNi4zMzguMDQtMi45LjA2LTQ5LjA0MycgZmlsbD0nI2Y1NScgc3Ryb2tlPScjZjU1JyBtYXJrZXItc3RhcnQ9J3VybCgjYiknIHRyYW5zZm9ybT0ndHJhbnNsYXRlKC0xLjE4MiAtNC42ODcpIHNjYWxlKDEuMDM4MjQpJy8+PC9nPjwvc3ZnPgo=c@t"

That base64 string is this SVG icon:

<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 135.46667 135.46667' height='64' width='64'><defs><marker orient='auto' id='b' overflow='visible'><path d='M.98 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0z' fill='#f55' fill-rule='evenodd' stroke='#f55' stroke-width='.267'/></marker><marker orient='auto' id='a' overflow='visible'><path d='M.98 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0z' fill='#ccc' fill-rule='evenodd' stroke='#ccc' stroke-width='.267'/></marker></defs><g stroke-width='14.779'><path d='M66.378 112.596c.013-31.726.027-5.63.04-95.235' fill='#ccc' stroke='#ccc' stroke-linecap='round' marker-start='url(#a)' transform='translate(-1.182 -4.687) scale(1.03824)'/><path d='M66.378 112.596c.02-16.338.04-2.9.06-49.043' fill='#f55' stroke='#f55' marker-start='url(#b)' transform='translate(-1.182 -4.687) scale(1.03824)'/></g></svg>

onstrt commented 1 year ago

In my case there are no .SVG icons.. #!/usr/bin/env bash ..

_./clutter/clutter/clutter-container.c:768: Containers of type 'Gjs_argos_pew_worldwidemann_com_lineviewArgosLineView' have no child property named 'y-fill'

Ubuntu 22.04.3 LTS GNOME Shell 42.9

real-or-random commented 1 year ago

I've been getting the same message forever with an SVG icon (haven't tried without).

I assume it's this line: https://github.com/p-e-w/argos/blob/e2d68ea23eed081fccaec06c384e2c5d2acb5b6b/argos%40pew.worldwidemann.com/lineview.js#L79-L80

I had a PR for a different problem, but I also had changed this line on the fly. This PR was closed because we couldn't reproduce the underlying issue, but I suspect part of it solves this issue here. In particular, the highlighted part of the commit should do the trick: https://github.com/p-e-w/argos/pull/106/files?diff=split&w=0#diff-fe5b5cf43ffbec6d1618aa84be67e235447b148d8138100e48f1d4830b132421L76-R84

I can open a PR, but it will probably require some testing with non-rectangular icons.