bilelmoussaoui/Hardcode-Tray

support CSS SVG's

varlesh opened this issue · 18 comments

Papirus now have CSS style for all monochrome icons.
But this not worked if icon converted to png... i don't know maybe it's bug...
For example Telegram:
image
Original icons for tray have color #d3dae3 and show on others DE fine and file managers too:
image
SVG code:

<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" version="1" id="svg2">
 <defs id="defs8">
  <style type="text/css" id="current-color-scheme">
   .ColorScheme-Text { color:#d3dae3; } .ColorScheme-Highlight { color:#5294e2; } .ColorScheme-ButtonBackground { color:#d3dae3; }
  </style>
 </defs>
 <path style="fill:currentColor" d="m17.934 3.0039c-0.455-0.0278-0.702 0.0517-7.362 2.3809-3.7899 1.3256-6.9764 2.4658-7.0798 2.5332-0.3008 0.1957-0.4922 0.5722-0.4922 0.9648 0 0.8431 0.3085 1.0797 3.3555 2.5662 1.5421 0.753 2.5756 1.303 2.7011 1.436 0.112 0.118 0.765 1.348 1.4494 2.734 1.238 2.502 1.521 2.971 1.967 3.24 0.473 0.288 1.117 0.12 1.496-0.39 0.178-0.239 4.958-13.743 5.017-14.174 0.056-0.4008-0.072-0.7765-0.355-1.047-0.189-0.1803-0.304-0.2201-0.697-0.2441zm-11.934 10.996a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2z" id="path4" class="ColorScheme-Text"/>
</svg>

@bil-elmoussaoui who convert SVG to PNG for hardcode-tray?

@varlesh We use either Inkscape or svg2png from cairo library

hm interested it's bug inkscape or cairo...

Can you try converting an svg file to a png using Inkscape ? you can use inkscape -z -f file_name.svg -e file_name.png and see if you still have the error. If not, i will add an argument to force using inkscape instead of using cairo by default; this way the users having this issue can have a fix waiting for the upstream bug fix

It's worked fine:
inkscape -z -f file_name.svg -e file_name.png
icon have original color #d3dae3

Perfect! i will add this right now.

Ok, i'm check this with -ug option

Fixed! Try using --force-inkscape documentation added to README too.

hardcode-tray -s 22 --force-inkscape -o telegram
but not worked - icons black :(

i'm update hardcode-tray with -ug, delete cache thumbnails and icons from tdata folder... but anyway icons black

Sorry it was a typo. Should be fixed now

ok, check...

Yes, all fine!
Thank you Bilal :)

You're welcome!

You very awesome!

KottV commented

@varlesh Somehow I broke whatsie icon. Now it's white on white panel.

Is this right choice? :
Plasma theme: Arc Color
Color scheme: Arc
KDE icons: Papirus-Dark
GTK icons: Papirus (with Papirus-Dark all gtk-apps has white icons)

I've tried latest git version of hardcode-tray with and without --force-inkscape

--force-inkscape need for fix bug black icons only, because hardcode-tray used cairo libs by default.
If you use another colors on KDE need change color manual for panel tray icons.
GTK, Electron and other non-KDE applications do not support KDE-color scheme, because it's unnecessary. Then either repainted by hand or make a request to the KDE that they gash support tray-KDE color scheme ... it is important to also note that, in most cases, the PNG-tray icon, but because speech about CSS and can not be, location can be in PNG styles in general?

KottV commented

Thank You. Got it.

PS varlesh, без обид, но твой гугл-транслэйт вообще непереводим:)