Fix #1918581 [Device View: Column header tooltip doesn't render italics](https://bugs.launchpad.net/calibre/+bug/1918581)

This commit is contained in:
Kovid Goyal 2021-03-11 12:29:40 +05:30
parent 21d24177c6
commit b2551d986e
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -1706,7 +1706,7 @@ class DeviceBooksModel(BooksModel): # {{{
text = self.headers[cname] text = self.headers[cname]
return '<b>{}</b>: {}'.format( return '<b>{}</b>: {}'.format(
prepare_string_for_xml(text), prepare_string_for_xml(text),
prepare_string_for_xml(_('The lookup/search name is <i>{0}</i>').format(self.column_map[section]))) prepare_string_for_xml(_('The lookup/search name is')) + ' <i>{}</i>'.format(self.column_map[section]))
if DEBUG and role == Qt.ItemDataRole.ToolTipRole and orientation == Qt.Orientation.Vertical: if DEBUG and role == Qt.ItemDataRole.ToolTipRole and orientation == Qt.Orientation.Vertical:
return (_('This book\'s UUID is "{0}"').format(self.db[self.map[section]].uuid)) return (_('This book\'s UUID is "{0}"').format(self.db[self.map[section]].uuid))
if role != Qt.ItemDataRole.DisplayRole: if role != Qt.ItemDataRole.DisplayRole: