Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support CSS SVG's #245

Closed
varlesh opened this issue Dec 10, 2016 · 18 comments
Closed

support CSS SVG's #245

varlesh opened this issue Dec 10, 2016 · 18 comments
Labels

Comments

@varlesh
Copy link
Collaborator

varlesh commented Dec 10, 2016

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>
@varlesh
Copy link
Collaborator Author

varlesh commented Dec 10, 2016

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

@bilelmoussaoui
Copy link
Owner

@varlesh We use either Inkscape or svg2png from cairo library

@varlesh
Copy link
Collaborator Author

varlesh commented Dec 10, 2016

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

@bilelmoussaoui
Copy link
Owner

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

@varlesh
Copy link
Collaborator Author

varlesh commented Dec 10, 2016

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

@bilelmoussaoui
Copy link
Owner

Perfect! i will add this right now.

@varlesh
Copy link
Collaborator Author

varlesh commented Dec 10, 2016

Ok, i'm check this with -ug option

@bilelmoussaoui
Copy link
Owner

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

@varlesh
Copy link
Collaborator Author

varlesh commented Dec 10, 2016

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

@varlesh
Copy link
Collaborator Author

varlesh commented Dec 10, 2016

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

@bilelmoussaoui
Copy link
Owner

Sorry it was a typo. Should be fixed now

@varlesh
Copy link
Collaborator Author

varlesh commented Dec 10, 2016

ok, check...

@varlesh
Copy link
Collaborator Author

varlesh commented Dec 10, 2016

Yes, all fine!
Thank you Bilal :)

@bilelmoussaoui
Copy link
Owner

You're welcome!

@varlesh
Copy link
Collaborator Author

varlesh commented Dec 10, 2016

You very awesome!

@KottV
Copy link

KottV commented Dec 14, 2016

@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

@varlesh
Copy link
Collaborator Author

varlesh commented Dec 14, 2016

--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
Copy link

KottV commented Dec 15, 2016

Thank You. Got it.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants