Skip to content

Widget.Icon SVG ignoring CSS color #41

Answered by linkfrg
seve-andre asked this question in Q&A
Discussion options

You must be logged in to vote

Oh, wait, after 1 month i found better solution

It's amazing, but if you add just one directory to the icon path, you don't have to bother with gresource and can simply add a search path to Gtk.IconTheme

  1. You can create a directory with any name, it must contain hicolor/scalable/actions directory. In this example I will use icons/hicolor/scalable/actions
  2. Put your icons in actions
  3. Use this code:
from gi.repository import Gtk, Gdk

icon_theme = Gtk.IconTheme.get_for_display(Gdk.Display.get_default())
icon_theme.add_search_path("PATH/TO/icons")

EDIT: #53 is merged, now you can use the IgnisApp.add_icons() method

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by linkfrg
Comment options

You must be logged in to vote
3 replies
@linkfrg
Comment options

@seve-andre
Comment options

@linkfrg
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants