This commit is contained in:
Kovid Goyal 2025-09-14 19:09:06 +05:30
parent 09abf38d1e
commit 90ab77e21a
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 4 additions and 3 deletions

View File

@ -743,7 +743,7 @@ class TemplateDialog(QDialog, Ui_TemplateDialog):
tv.setHorizontalHeaderLabels((_('Book title'), '', _('Template value')))
tv.horizontalHeader().setStretchLastSection(True)
tv.horizontalHeader().sectionResized.connect(self.table_column_resized)
tv.setRowCount(len(mi) )
tv.setRowCount(len(mi))
# Set the height of the table
h = tv.rowHeight(0) * min(row_count, 5)
h += 2 * tv.frameWidth() + tv.horizontalHeader().height()

View File

@ -55,7 +55,7 @@ CASE_CHANGES = _('Case changes')
DATE_FUNCTIONS = _('Date functions')
DB_FUNCS = _('Database functions')
URL_FUNCTIONS = _('URL functions')
GUI_FUNCTIONS = __('GUI functions')
GUI_FUNCTIONS = _('GUI functions')
# Class and method to save an untranslated copy of translated strings
@ -3737,9 +3737,10 @@ This function can be used only in the GUI.
''')
def evaluate(self, formatter, kwargs, mi, locals, html):
from calibre.gui2.widgets2 import Dialog, HTMLDisplay
from qt.core import QDialog, QVBoxLayout
from calibre.gui2.widgets2 import Dialog, HTMLDisplay
class HTMLDialog(Dialog):
def __init__(self, title, prefs):