Fix comments editor in review metadata becoming too small

Fix comments editor in review metadata becoming too small
on small screens. Fixes #1245275 [review downloaded metadata doesn't show the comments field](https://bugs.launchpad.net/calibre/+bug/1245275)
This commit is contained in:
Kovid Goyal 2013-10-28 08:41:16 +05:30
parent 2e2f74ea09
commit e4557408a8
2 changed files with 4 additions and 0 deletions

View File

@ -640,6 +640,9 @@ class Editor(QWidget): # {{{
self.highlighter = Highlighter(self.code_edit.document())
self.layout().setContentsMargins(0, 0, 0, 0)
def set_minimum_height_for_editor(self, val):
self.editor.setMinimumHeight(val)
# toolbar1 {{{
self.toolbar1.addAction(self.editor.action_undo)
self.toolbar1.addAction(self.editor.action_redo)

View File

@ -213,6 +213,7 @@ class CommentsEdit(Editor):
def __init__(self, field, is_new, parent, metadata, extra):
Editor.__init__(self, parent, one_line_toolbar=False)
self.set_minimum_height_for_editor(150)
self.is_new = is_new
self.field = field
self.metadata = metadata