mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
pep8
This commit is contained in:
parent
b45e97134e
commit
fa227be4dd
@ -364,7 +364,7 @@ class CcCommentsDelegate(QStyledItemDelegate): # {{{
|
|||||||
if hasattr(QStyle, 'CE_ItemViewItem'):
|
if hasattr(QStyle, 'CE_ItemViewItem'):
|
||||||
style.drawControl(QStyle.CE_ItemViewItem, option, painter)
|
style.drawControl(QStyle.CE_ItemViewItem, option, painter)
|
||||||
ctx = QAbstractTextDocumentLayout.PaintContext()
|
ctx = QAbstractTextDocumentLayout.PaintContext()
|
||||||
ctx.palette = option.palette #.setColor(QPalette.Text, QColor("red"));
|
ctx.palette = option.palette # .setColor(QPalette.Text, QColor("red"));
|
||||||
if hasattr(QStyle, 'SE_ItemViewItemText'):
|
if hasattr(QStyle, 'SE_ItemViewItemText'):
|
||||||
textRect = style.subElementRect(QStyle.SE_ItemViewItemText, option)
|
textRect = style.subElementRect(QStyle.SE_ItemViewItemText, option)
|
||||||
painter.save()
|
painter.save()
|
||||||
@ -457,7 +457,7 @@ class CcTemplateDelegate(QStyledItemDelegate): # {{{
|
|||||||
validation_formatter.validate(val)
|
validation_formatter.validate(val)
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
error_dialog(self.parent(), _('Invalid template'),
|
error_dialog(self.parent(), _('Invalid template'),
|
||||||
'<p>'+_('The template %s is invalid:')%val + \
|
'<p>'+_('The template %s is invalid:')%val +
|
||||||
'<br>'+str(err), show=True)
|
'<br>'+str(err), show=True)
|
||||||
model.setData(index, QVariant(val), Qt.EditRole)
|
model.setData(index, QVariant(val), Qt.EditRole)
|
||||||
|
|
||||||
@ -469,3 +469,4 @@ class CcTemplateDelegate(QStyledItemDelegate): # {{{
|
|||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user