On Mon, 21 Oct 2013 20:26:53 -0700 (PDT)
David McNab <[email protected]> wrote:
> I'm wanting to use Leo for writing university essays, reports, case
> studies etc. But to make this practical, when editing works of
> thousands of words, I really need to increase the line spacing to
> support easier reading and focus.
As of Qt 4.8, the following script can be executed to set line spacing
to 190% for the given outline for the current session.
from PyQt4 import QtGui
def hook(tag, kwds, c=c):
if kwds['c'] != c:
return
bodyWidget = c.frame.body.bodyCtrl.widget
doc = bodyWidget.document()
for i in range(doc.blockCount()):
block = doc.findBlockByNumber(i)
curs = QtGui.QTextCursor(block)
fmt = block.blockFormat()
fmt.setLineHeight(190, QtGui.QTextBlockFormat.ProportionalHeight)
curs.setBlockFormat(fmt)
g.registerHandler("select3", hook)
Cheers -Terry
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/groups/opt_out.