center text overlay for cover

This commit is contained in:
Loic Houpert
2021-01-15 09:11:05 +01:00
parent 6788921684
commit d0ced3eb48
+2 -1
View File
@@ -299,7 +299,8 @@ class Mediapart(BasicNewsRecipe):
p.setFont(font)
# Add date
p.drawText(125, 750, date)
r = QRect(0, 600, 744,200)
p.drawText(r, Qt.AlignmentFlag.AlignJustify | Qt.AlignmentFlag.AlignVCenter | Qt.AlignmentFlag.AlignCenter, date)
p.end()
print(f'create_cover_mediapart\nDate: {date}\n')
return pixmap_to_data(img)