macOS: Fix a regression in calibre 8 that prevented icons in menus from being rendered. Fixes #2103777 [Small icons in front of menus missing](https://bugs.launchpad.net/calibre/+bug/2103777)

This commit is contained in:
Kovid Goyal 2025-03-22 08:02:47 +05:30
parent c741ec7035
commit b71d7b7e2b
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 2 additions and 0 deletions

View File

@ -53,6 +53,7 @@ Environment variables
* ``CALIBRE_SHOW_DEPRECATION_WARNINGS`` - causes calibre to print deprecation warnings to stdout. Useful for calibre developers.
* ``CALIBRE_NO_DEFAULT_PROGRAMS`` - prevent calibre from automatically registering the filetypes it is capable of handling with Windows.
* ``CALIBRE_USE_SYSTEM_CERTIFICATES`` - make calibre use the system certificate store for SSL certificate verification instead of its own certificate store on Windows and macOS.
* ``CALIBRE_NO_ICONS_IN_MENUS`` - Disable icons in menus
* ``QT_QPA_PLATFORM`` - On Linux set this to ``wayland`` to force calibre to use Wayland and ``xcb`` to force use of X11.
* ``SYSFS_PATH`` - Use if sysfs is mounted somewhere other than /sys
* ``http_proxy``, ``https_proxy`` - used on Linux to specify an HTTP(S) proxy

View File

@ -1240,6 +1240,7 @@ class Application(QApplication):
self.setup_unix_signals()
if islinux or isbsd:
self.setAttribute(Qt.ApplicationAttribute.AA_DontUseNativeMenuBar, 'CALIBRE_NO_NATIVE_MENUBAR' in os.environ)
self.setAttribute(Qt.ApplicationAttribute.AA_DontShowIconsInMenus, 'CALIBRE_NO_ICONS_IN_MENUS' in os.environ)
self.palette_manager.setup_styles()
self.setup_ui_font()
fi = gprefs['font']