From 9dd67cd7e8ec8e9aabb4493549caf05a311309c2 Mon Sep 17 00:00:00 2001 From: Charles Haley Date: Tue, 28 Jan 2025 21:24:08 +0000 Subject: [PATCH] Make partitioning icons respect the "Show value icons" option instead of the "show category icons" one --- src/calibre/gui2/tag_browser/model.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/tag_browser/model.py b/src/calibre/gui2/tag_browser/model.py index f17af8c0f8..f7707cea38 100644 --- a/src/calibre/gui2/tag_browser/model.py +++ b/src/calibre/gui2/tag_browser/model.py @@ -164,8 +164,13 @@ class TagTreeItem: # {{{ cc = self.category_custom_icons.get(self.tag.category, None) else: cc = self.icon - elif self.type == self.CATEGORY and gprefs['tag_browser_show_category_icons']: - cc = self.category_custom_icons.get(self.category_key, None) + elif self.type == self.CATEGORY: + if self.parent.type == self.ROOT: + if gprefs['tag_browser_show_category_icons']: + cc = self.category_custom_icons.get(self.category_key, None) + else: + if gprefs['tag_browser_show_value_icons']: + cc = self.category_custom_icons.get(self.category_key, None) self.icon_state_map[0] = cc or QIcon() def __str__(self):