Line spacing and focused text

Yesterday I added the single most requested feature to FocusWriter: users can now set the line spacing per theme (and paragraph spacing, and indent the first line of each paragraph). However, there is one caveat: because I couldn’t find any way to override or merge QTextBlockFormats without modifying documents users will need to reload their files to get the different spacings for each theme. I spent a good deal of time looking around in the source code of Qt trying to find a way to do it, but please let me know if there is something I’ve overlooked! I figured out to directly change the QTextBlockFormats without modifying the documents, so now the different spacings take effect immediately.

I also added another popular request, the ability to choose what text is “focused”. Users can now choose between having one line focused, three lines focused, the current paragraph focused, or (the default) all of the text focused. It was actually quite a bit easier to add than I was expecting it to be because I was able to make use of QTextEdit’s “extra selections” (designed primarily for things like highlighting the current line in a text editor) to set the focused text to opaque, and leave the unfocused text translucent.

FocusWriter narrow focusFocusWriter broad focusFocusWriter paragraph focusFocusWriter all focus

About these ads
  • Trackback are closed
  • Comments (6)
    • Todd Lucas
    • May 20th, 2012

    Sweet! Now are you a titanic tease ;-p

    Oh, and welcome back from your break.

  1. Isn’t the point of development blogs to be a tease of things to come? :-)

    Thanks, it’s good to be back!

  2. Any chance someday also of headers, footers, page #s, and footnotes/endnotes? (Couldn’t help but ask!) Love FocusWriter!

  3. Sorry, but no. Those are page layout features and outside the scope of FocusWriter. I also don’t know if QTextEdit supports them. Still, I will be sure to blog about it if I change my mind!

    • Peter
    • July 20th, 2012

    “users can now set the line spacing per theme (and paragraph spacing, and indent the first line of each paragraph). ”
    Sounds good, but unfortunately I can not find the settings anywhere :-(

  4. The spacings are set on the last tab of the modify theme dialog in the development version.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: