View Single Post
Old 04-29-2026, 11:16 AM   #28
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,971
Karma: 82520964
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Quote:
Originally Posted by gurcha View Post
Subject: Request: Add support for icon overrides / theming



Hi,



Could you please add support for Calibre's built‑in icon theming in a future update?



Currently your plugin uses a custom get_icon() function, which prevents users from overriding the toolbar icon with their own custom images or Calibre icon themes.



The fix is simple: replace the custom function with Calibre's native get_icons(). For example:



python

# Instead of a custom get_icon() function...

# Use Calibre's built-in function:

from calibre.customize.zipplugin import get_icons



icon = get_icons('icon.png', 'Your Plugin Name')

self.qaction.setIcon(icon)

This would allow users to place a custom icon.png in:

calibre/resources/images/Your Plugin Name/icon.png



And it would also make the plugin respect the user's active Calibre icon theme.



There are actually four icons (audit.png, undo.png, empty.png, wrench-hammer.png) that would all benefit from theming support. So you would need to apply get_icons() to each menu action, not just the main toolbar button, but the main toolbar icon is the most important.



Thank you for considering this. I really appreciate your work on this plugin.



Thanks
Unfortunately the original author is long gone and noone appears to have stepped up with enhancements
PeterT is offline   Reply With Quote