From e4557408a8538716ae59d01b2041106fa67c9098 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 28 Oct 2013 08:41:16 +0530 Subject: [PATCH] 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) --- src/calibre/gui2/comments_editor.py | 3 +++ src/calibre/gui2/metadata/diff.py | 1 + 2 files changed, 4 insertions(+) diff --git a/src/calibre/gui2/comments_editor.py b/src/calibre/gui2/comments_editor.py index c5058067d5..fa599f37bf 100644 --- a/src/calibre/gui2/comments_editor.py +++ b/src/calibre/gui2/comments_editor.py @@ -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) diff --git a/src/calibre/gui2/metadata/diff.py b/src/calibre/gui2/metadata/diff.py index 32364da687..17e340dc65 100644 --- a/src/calibre/gui2/metadata/diff.py +++ b/src/calibre/gui2/metadata/diff.py @@ -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