mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-06 00:23:51 +02:00
Fix #948357 (Increased font size in book details)
This commit is contained in:
commit
d4cf454f1b
4 changed files with 13 additions and 3 deletions
|
|
@ -496,3 +496,9 @@
|
|||
# prefer HTMLZ to EPUB for tweaking, change this to 'htmlz'
|
||||
tweak_book_prefer = 'epub'
|
||||
|
||||
#: Change the font size of book details in the interface
|
||||
# Change the font size at which book details are rendered in the side panel and
|
||||
# comments are rendered in the metadata edit dialog. Set it to a positive or
|
||||
# negative number to increase or decrease the font size.
|
||||
change_book_details_font_size_by = 0
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
from calibre.utils.formatter import EvalFormatter
|
||||
from calibre.utils.date import is_date_undefined
|
||||
from calibre.utils.localization import calibre_langcode_to_name
|
||||
from calibre.utils.config import tweaks
|
||||
|
||||
def render_html(mi, css, vertical, widget, all_fields=False): # {{{
|
||||
table = render_data(mi, all_fields=all_fields,
|
||||
|
|
@ -39,7 +40,7 @@ def color_to_string(col):
|
|||
return ans
|
||||
|
||||
fi = QFontInfo(QApplication.font(widget))
|
||||
f = fi.pixelSize()+1
|
||||
f = fi.pixelSize() + 1 + int(tweaks['change_book_details_font_size_by'])
|
||||
fam = unicode(fi.family()).strip().replace('"', '')
|
||||
if not fam:
|
||||
fam = 'sans-serif'
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
from calibre import xml_replace_entities
|
||||
from calibre.gui2 import open_url
|
||||
from calibre.utils.soupparser import fromstring
|
||||
from calibre.utils.config import tweaks
|
||||
|
||||
class PageAction(QAction): # {{{
|
||||
|
||||
|
|
@ -252,7 +253,7 @@ def fget(self):
|
|||
def fset(self, val):
|
||||
self.setHtml(val)
|
||||
fi = QFontInfo(QApplication.font(self))
|
||||
f = fi.pixelSize()+1
|
||||
f = fi.pixelSize() + 1 + int(tweaks['change_book_details_font_size_by'])
|
||||
fam = unicode(fi.family()).strip().replace('"', '')
|
||||
if not fam:
|
||||
fam = 'sans-serif'
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@
|
|||
UNDEFINED_DATE, as_utc)
|
||||
from calibre.library.comments import comments_to_html
|
||||
from calibre import force_unicode
|
||||
from calibre.utils.config import tweaks
|
||||
|
||||
# }}}
|
||||
|
||||
class RichTextDelegate(QStyledItemDelegate): # {{{
|
||||
|
|
@ -326,7 +328,7 @@ def color_to_string(col):
|
|||
return ans
|
||||
|
||||
fi = QFontInfo(QApplication.font(self.parent()))
|
||||
f = fi.pixelSize()+1
|
||||
f = fi.pixelSize()+1+int(tweaks['change_book_details_font_size_by'])
|
||||
fam = unicode(fi.family()).strip().replace('"', '')
|
||||
if not fam:
|
||||
fam = 'sans-serif'
|
||||
|
|
|
|||
Loading…
Reference in a new issue