Support for activity icons inside the bundle.
Patch by Gonzalo Odiard <godiard@gmail.com> Modified by me to allow icon theme to override the bundle one.
This commit is contained in:
@@ -52,7 +52,14 @@ class _IconCache:
|
||||
return rsvg.Handle(data=data)
|
||||
|
||||
def get_handle(self, name, color, size):
|
||||
info = self._theme.lookup_icon(name, int(size), 0)
|
||||
if name[0:6] == "theme:":
|
||||
icon = self._read_icon_from_name(name[6:], color, size)
|
||||
else:
|
||||
icon = self._read_icon(name, color)
|
||||
return icon
|
||||
|
||||
def _read_icon_from_name(self, name, color, size):
|
||||
info = self._theme.lookup_icon(name, size, 0)
|
||||
|
||||
if not info:
|
||||
raise "Icon '" + name + "' not found."
|
||||
|
||||
Reference in New Issue
Block a user