[core/theme] Fix loading of iconsets

* First, make iconsets override anything already present in the "base"
configuration
* Second, make sure that CLI provided iconsets have higher priority than
"built-in" ones

see #648
This commit is contained in:
tobi-wan-kenobi 2020-06-06 15:59:19 +02:00
parent 034e8eefb9
commit ba82f5a50f

View file

@ -51,10 +51,11 @@ class Theme(object):
self.__keywords = {}
self.__value_idx = {}
self.__data = raw_data if raw_data else self.load(name)
for icons in self.__data.get("icons", []):
self.__data = util.algorithm.merge(self.load(icons, "icons"), self.__data)
if iconset != "auto":
self.__data = util.algorithm.merge(self.load(iconset, "icons"), self.__data)
for icons in self.__data.get("icons", []):
util.algorithm.merge(self.__data, self.load(icons, "icons"))
for colors in self.__data.get("colors", []):
util.algorithm.merge(self.__keywords, self.load_keywords(colors))