[mythtv-firehose] mythtv/master commit: 8f757eeaf by John Patrick Poet (jpoet)

MythTV noreply at mythtv.org
Sun Oct 2 18:27:23 UTC 2011


      Author:  John Patrick Poet <jpoet at mythtv.org>
 Change Date:  2011-10-02T11:14:45-07:00
   Push Date:  2011/10/02 11:27:16 -0700
  Repository:  mythtv
      Branch:  master
New Revision:  8f757eeafca7c83709ed76a5c54ebad16ab8f35a
   Changeset:  https://github.com/MythTV/mythtv/commit/8f757eeaf

Log:

MythUI: Use QTextLayout in mythuitext.

The primary purpose of this change, is to leverage QTextLayout's internal
tracking of the cursor position for use by mythuitextedit.  The cursor
position should now be accurate even when using non-mono-spaced fonts.
Multi-line textedits are now rendered correctly.  If the text being
edited does not fit in the allowed area, it will be automatically scrolled
as necessary, to keep the cursor in view.

QTextLayout supports a FormatRange of QTextCharFormat which would
allow us to have "spans" of differently formatted text within a textarea.
This patch does not add that support, I am just pointing out the possibility.

Modified:

   mythtv/libs/libmythui/mythpainter.cpp
   mythtv/libs/libmythui/mythpainter.h
   mythtv/libs/libmythui/mythpainter_ogl.cpp
   mythtv/libs/libmythui/mythrender_opengl.cpp
   mythtv/libs/libmythui/mythuitext.cpp
   mythtv/libs/libmythui/mythuitext.h
   mythtv/libs/libmythui/mythuitextedit.cpp



More information about the mythtv-firehose mailing list