Enhancement #1956129: render line breaks in custom column *description* on hover column title.

This commit is contained in:
Charles Haley 2022-01-01 11:39:32 +00:00
parent 3f16b5ac61
commit 6fcd0eb8a5

View File

@ -1038,7 +1038,9 @@ class BooksModel(QAbstractTableModel): # {{{
if fm['is_custom']:
cust_desc = fm['display'].get('description', '')
if cust_desc:
cust_desc = '<br><b>{}</b>'.format(_('Description:')) + ' ' + prepare_string_for_xml(cust_desc)
cust_desc = ('<br><b>{}</b>'.format(_('Description:')) +
'<span style="white-space:pre-wrap"> ' +
prepare_string_for_xml(cust_desc) + '</span>')
return '<b>{}</b>: {}'.format(
prepare_string_for_xml(title),
_('The lookup/search name is <i>{0}</i>').format(ht) + cust_desc + is_cat