mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Make the list actions toggles
This commit is contained in:
parent
9c5aaade6f
commit
fcb72c0075
@ -338,6 +338,9 @@ class EditorWidget(QTextEdit, LineEditECM): # {{{
|
||||
ls = c.currentList()
|
||||
if ls is not None:
|
||||
lf = ls.format()
|
||||
if lf.style() == fmt:
|
||||
c.setBlockFormat(QTextBlockFormat())
|
||||
else:
|
||||
lf.setStyle(fmt)
|
||||
ls.setFormat(lf)
|
||||
else:
|
||||
@ -1053,6 +1056,6 @@ if __name__ == '__main__':
|
||||
w.show()
|
||||
w.html = '''<h1>Test Heading</h1><blockquote>Test blockquote</blockquote><p><span style="background-color: rgb(0, 255, 255); ">He hadn't
|
||||
set <u>out</u> to have an <em>affair</em>, <span style="font-style:italic; background-color:red">
|
||||
much</span> less a <s>long-term</s>, <b>devoted</b> one.</span>'''
|
||||
much</span> less a <s>long-term</s>, <b>devoted</b> one.</span><p>hello'''
|
||||
app.exec_()
|
||||
# print w.html
|
||||
|
Loading…
x
Reference in New Issue
Block a user