emmental/ui/icons.py
Anna Schumaker ba5f21b0c0 Icons: Add our custom icons to the search path
But only when we're running in debug mode. Running while installed
should use the icons from the default search path

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:51:54 -04:00

15 lines
382 B
Python

# Copyright 2021 (c) Anna Schumaker.
from . import window
from lib import version
from gi.repository import Gtk
import pathlib
IconPath = pathlib.Path("data/").absolute()
if version.DEBUG == True:
Display = window.Window.get_display()
Theme = Gtk.IconTheme.get_for_display(Display)
paths = Theme.get_search_path()
Theme.set_search_path([ str(IconPath) ] + paths)