mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Allow for-light/dark-theme icon overrides to work for plugin icons placed by the user in the override dir
This commit is contained in:
parent
c552076d91
commit
fe29b9a34d
@ -173,6 +173,11 @@ class IconResourceManager:
|
|||||||
ans = os.path.join(self.override_icon_path, sq)
|
ans = os.path.join(self.override_icon_path, sq)
|
||||||
elif len(parts) == 2:
|
elif len(parts) == 2:
|
||||||
entries = self.override_items.get(parts[0], ())
|
entries = self.override_items.get(parts[0], ())
|
||||||
|
if not entries and self.override_icon_path and parts[0] not in self.override_items:
|
||||||
|
try:
|
||||||
|
self.override_items[parts[0]] = entries = frozenset(os.listdir(os.path.join(self.override_icon_path, parts[0])))
|
||||||
|
except OSError:
|
||||||
|
self.override_items[parts[0]] = entries = frozenset()
|
||||||
if entries:
|
if entries:
|
||||||
sq, ext = os.path.splitext(parts[1])
|
sq, ext = os.path.splitext(parts[1])
|
||||||
sq = f'{sq}-for-{self.color_palette}-theme{ext}'
|
sq = f'{sq}-for-{self.color_palette}-theme{ext}'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user