mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-31 14:33:54 -04:00
Live CSS: Dont make the heading fonts larger than the rest of the text
This commit is contained in:
parent
4dccd159ed
commit
6786df58d1
@ -6,11 +6,11 @@ from __future__ import (unicode_literals, division, absolute_import,
|
|||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'
|
__copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||||
|
|
||||||
import json, math
|
import json
|
||||||
|
|
||||||
from PyQt4.Qt import (
|
from PyQt4.Qt import (
|
||||||
QWidget, QTimer, QStackedLayout, QLabel, QScrollArea, QVBoxLayout,
|
QWidget, QTimer, QStackedLayout, QLabel, QScrollArea, QVBoxLayout,
|
||||||
QPainter, Qt, QFontInfo, QPalette, QRect, QSize, QSizePolicy, pyqtSignal,
|
QPainter, Qt, QPalette, QRect, QSize, QSizePolicy, pyqtSignal,
|
||||||
QColor)
|
QColor)
|
||||||
|
|
||||||
from calibre.constants import iswindows
|
from calibre.constants import iswindows
|
||||||
@ -37,8 +37,6 @@ class Heading(QWidget): # {{{
|
|||||||
except AttributeError:
|
except AttributeError:
|
||||||
return
|
return
|
||||||
f.setBold(True)
|
f.setBold(True)
|
||||||
sz = QFontInfo(f).pointSize()
|
|
||||||
f.setPointSize(int(math.ceil(1.2 * sz)))
|
|
||||||
self.setFont(f)
|
self.setFont(f)
|
||||||
|
|
||||||
def mousePressEvent(self, ev):
|
def mousePressEvent(self, ev):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user