mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-05 16:53:37 +02:00
...
This commit is contained in:
parent
19d1255af3
commit
3a42fee5bb
1 changed files with 4 additions and 1 deletions
|
|
@ -82,7 +82,9 @@ def leaveEvent(self, ev):
|
|||
return QWidget.leaveEvent(self, ev)
|
||||
# }}}
|
||||
|
||||
class Cell(object):
|
||||
class Cell(object): # {{{
|
||||
|
||||
__slots__ = ('rect', 'text', 'right_align', 'color_role', 'override_color')
|
||||
|
||||
SIDE_MARGIN = 5
|
||||
FLAGS = Qt.AlignVCenter | Qt.TextSingleLine | Qt.TextIncludeTrailingSpaces
|
||||
|
|
@ -100,6 +102,7 @@ def draw(self, painter, width, palette):
|
|||
rect.setRight(width - self.SIDE_MARGIN)
|
||||
painter.setPen(palette.color(self.color_role) if self.override_color is None else self.override_color)
|
||||
painter.drawText(rect, flags, self.text)
|
||||
# }}}
|
||||
|
||||
class Declaration(QWidget):
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue