capink's code looks fine (aside from overuse of temp variables, IMO).
But again, my understanding of FM is relatively shallow and I'm not comfortable with this unless it's been thoroughly tested. And I'm not particularly interested in doing that testing myself.
Disabled options not being visible in Dark Mode isn't really FM's fault--that's Dark Mode or Calibre or Qt in some combination.
It's not difficult to append '(not found)' or something to the displayed text and/or set a specific icon to disabled menu entries--although color is lost due to being disabled; and the 'standard' icons included in Calibre can be changed by Calibre icon themes.
Or instead of being disabled, invalid actions could pop a dialog reporting they are invalid now. And have specific icon.
|