mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 03:23:47 +02:00
Allow icons to be loaded in the toolbar preferences for external plugins
This commit is contained in:
parent
6b06c0606e
commit
6dcdd98ef4
1 changed files with 4 additions and 0 deletions
|
|
@ -55,6 +55,10 @@ def data(self, index, role):
|
|||
text = _('Choose library')
|
||||
return QVariant(text)
|
||||
if role == Qt.DecorationRole:
|
||||
if hasattr(self._data[row], 'qaction'):
|
||||
icon = self._data[row].qaction.icon()
|
||||
if not icon.isNull():
|
||||
return QVariant(icon)
|
||||
ic = action[1]
|
||||
if ic is None:
|
||||
ic = 'blank.png'
|
||||
|
|
|
|||
Loading…
Reference in a new issue