[theme] load custom iconset first

the "merge" algorithm only fills in missing elements - i.e. the most
important pieces of a data structure must be filled in first. since the
iconset specified on the CLI takes precedence over anything present in
the config, load the CLI-provided iconset *first*.

hopefully fixes #634
This commit is contained in:
Tobias Witek 2020-05-26 07:56:04 +02:00
parent 6e7340fcb1
commit f1ce5e162a

View file

@ -52,10 +52,10 @@ 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", []):
util.algorithm.merge(self.__data, self.load(icons, "icons"))
if iconset != "auto":
util.algorithm.merge(self.__data, self.load(iconset, "icons"))
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))