mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1924187 [Edit metadata: Text alignment on lists in WYSIWYG editor](https://bugs.launchpad.net/calibre/+bug/1924187)
This commit is contained in:
parent
52adf96211
commit
8c0791e359
@ -458,9 +458,9 @@ class EditorWidget(QTextEdit, LineEditECM): # {{{
|
|||||||
def do_alignment(self, which):
|
def do_alignment(self, which):
|
||||||
with self.editing_cursor() as c:
|
with self.editing_cursor() as c:
|
||||||
c = self.textCursor()
|
c = self.textCursor()
|
||||||
fmt = c.blockFormat()
|
fmt = QTextBlockFormat()
|
||||||
fmt.setAlignment(which)
|
fmt.setAlignment(which)
|
||||||
c.setBlockFormat(fmt)
|
c.mergeBlockFormat(fmt)
|
||||||
|
|
||||||
def do_align_left(self):
|
def do_align_left(self):
|
||||||
self.do_alignment(Qt.AlignmentFlag.AlignLeft)
|
self.do_alignment(Qt.AlignmentFlag.AlignLeft)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user