diff --git a/src/calibre/gui2/book_details.py b/src/calibre/gui2/book_details.py
index eb8dc0d064..4deadbc857 100644
--- a/src/calibre/gui2/book_details.py
+++ b/src/calibre/gui2/book_details.py
@@ -173,6 +173,7 @@ class Label(QLabel):
self.setTextFormat(Qt.RichText)
self.setText('')
self.setWordWrap(True)
+ self.setAlignment(Qt.AlignTop)
self.linkActivated.connect(self.link_activated)
self._link_clicked = False
self.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
@@ -205,15 +206,15 @@ class BookInfo(QScrollArea):
rows = render_rows(data)
rows = u'\n'.join([u'
%s: | %s |
'%(k,t) for
k, t in rows])
+ comments = ''
+ if data.get(_('Comments'), '') not in ('', u'None'):
+ comments = data[_('Comments')]
+ comments = comments_to_html(comments)
if self.vertical:
- if _('Comments') in data and data[_('Comments')]:
- comments = comments_to_html(data[_('Comments')])
+ if comments:
rows += u'%s |
'%comments
self.label.setText(u''%rows)
else:
- comments = ''
- if _('Comments') in data:
- comments = comments_to_html(data[_('Comments')])
left_pane = u''%rows
right_pane = u'%s
'%comments
self.label.setText(u' | ')
+ return u'%s
'%comments
+
# Hackish - ignoring sentences ending or beginning in numbers to avoid
# confusion with decimal points.