From 015d0b9c38d262058e42e40c9436a5dfaf4a4852 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 16 Jan 2020 08:34:28 +0530 Subject: [PATCH] Fix #1859552 [[Enhancement] Remove unnecessary space at the bottom of Print to PDF screen](https://bugs.launchpad.net/calibre/+bug/1859552) --- src/calibre/gui2/viewer/printing.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/calibre/gui2/viewer/printing.py b/src/calibre/gui2/viewer/printing.py index 0b6c350e3d..f2b22c3c03 100644 --- a/src/calibre/gui2/viewer/printing.py +++ b/src/calibre/gui2/viewer/printing.py @@ -10,7 +10,7 @@ from threading import Thread from PyQt5.Qt import ( QCheckBox, QComboBox, QDoubleSpinBox, QFormLayout, QHBoxLayout, QIcon, QLabel, - QLineEdit, QPageSize, QPrinter, QProgressDialog, QTimer, QToolButton + QLineEdit, QPageSize, QPrinter, QProgressDialog, QTimer, QToolButton, QVBoxLayout ) from calibre import sanitize_file_name @@ -42,7 +42,10 @@ class PrintDialog(Dialog): Dialog.__init__(self, _('Print to PDF'), 'print-to-pdf', prefs=prefs, parent=parent) def setup_ui(self): - self.l = l = QFormLayout(self) + self.vl = vl = QVBoxLayout(self) + self.l = l = QFormLayout() + vl.addLayout(l) + l.setContentsMargins(0, 0, 0, 0) l.addRow(QLabel(_('Print %s to a PDF file') % elided_text(self.book_title))) self.h = h = QHBoxLayout() self.file_name = f = QLineEdit(self) @@ -91,7 +94,8 @@ class PrintDialog(Dialog): sf.setChecked(vprefs.get('print-to-pdf-show-file', True)) l.addRow(sf) - l.addRow(self.bb) + vl.addStretch(10) + vl.addWidget(self.bb) @property def data(self): @@ -237,4 +241,5 @@ def print_book(path_to_book, parent=None, book_title=None): if __name__ == '__main__': app = Application([]) print_book(sys.argv[-1]) + del app