aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/items/qsgtextnode.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix extra selection in QML TextEditEskil Abrahamsen Blomfeldt2011-09-221-1/+1
| | | | | | | | | | | | QSGTextEdit::selectionEnd() interprets the selection end as the first character after the selection, while QSGTextNode expects it to be the end of the selection. Task-number: QTBUG-21533 Change-Id: Ia928602f8a2f845f3990a443e62f640ea72aa1d4 Reviewed-on: http://codereview.qt-project.org/5363 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Support preedit text in QSGTextInputEskil Abrahamsen Blomfeldt2011-09-151-54/+70
| | | | | | | | | | | | | | We need to support merged additional formats with backgrounds in the QSGTextInput as well, so that code has been separated into its own function. We also need to account for the position in the bounding rect, so that the decorations are painted at the correct location when there text input is scrolled. Task-number: QTBUG-21261 Change-Id: I0799a62bf26e6a7a2c1a6eef9bbdf889c1c8e870 Reviewed-on: http://codereview.qt-project.org/4964 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Fix pre-edit text in in QSGTextEditEskil Abrahamsen Blomfeldt2011-09-151-88/+176
| | | | | | | | | | | | We need to include the preedit text when getting the glyphs for the fragment, and we need to support background formats. Note: This assumes that the pre-edit text will not span several fragments, which seems like a reasonable assumption. Task-number: QTBUG-21261 Change-Id: I7dd28f1221f931893ba1c51cc9e8b9771b2e46c3 Reviewed-on: http://codereview.qt-project.org/4906 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Support font color with Text.StyledText in SceneGraphEskil Abrahamsen Blomfeldt2011-08-311-22/+72
| | | | | | | | | | | | | | | When Text.StyledText is set as format, QML will use a QTextLayout back-end with additional formats to render styled text, supporting a few HTML tags. To support color changes using this format, we need to process the additional formats in the text node. The code that fetches glyph runs is now separated into its own function and is called once per color-changing format if any such exist. Task-number: QTBUG-21199 Change-Id: Ib9b0cbec8d23de2dfafae9f641a2e3f7819c6a7a Reviewed-on: http://codereview.qt.nokia.com/3982 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Merge branch 'master' into refactorGunnar Sletta2011-08-251-133/+648
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/declarative/items/qsgcanvas.cpp src/declarative/items/qsgitem.cpp src/declarative/items/qsgtextnode.cpp tests/auto/declarative/examples/examples.pro tools/qmlviewer/qmlviewer.pro Change-Id: Icbb0ef5dc79b658c62fd2b2c25a66c9bb3cbeb10
| * Make QSGTextNode back-end for QML's TextInput and TextEditEskil Abrahamsen Blomfeldt2011-08-191-121/+641
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the general QSGTextNode class as back-end for all text elements in QML to make all text elements look the same and use the same text rasterization back-end. This requires a few rewrites in the text node to support e.g. selections. Crashes seen with threaded renderer in TextEdit and TextInput on Mac are also fixed by this. Reviewed-by: Jiang Jiang Task-number: QTBUG-18019, QTBUG-20017 Change-Id: I4207faf180c83422e5f8b726741321af395bd724 Reviewed-on: http://codereview.qt.nokia.com/2865 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
| * QSGDistanceFieldGlyphCache code refactoring.Yoann Lopes2011-08-101-5/+2
| | | | | | | | | | | | | | | | The distance field glyph caches are now contained in the QSGContext. Change-Id: Ifc5d155917314b1cc5905ef86fdad0bbc5635c7d Reviewed-on: http://codereview.qt.nokia.com/2787 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* | Implement VBO caching of larger geometriesGunnar Sletta2011-08-111-1/+12
|/ | | | | | | Change-Id: If87b70b191a06448287b47d252a288b441af6302 Reviewed-on: http://codereview.qt.nokia.com/2784 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Yoann Lopes <yoann.lopes@nokia.com>
* Fixed QSGDistanceFieldGlyphNode initialization order.Yoann Lopes2011-07-201-1/+5
| | | | | | | Change-Id: Id2e8ccf6441ce7e7a2bcdd6f0d50745e7d9ba653 Reviewed-on: http://codereview.qt.nokia.com/1750 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Yoann Lopes <yoann.lopes@nokia.com>
* Update licenseheader text in source files for qtdeclarative Qt moduleJyri Tahtela2011-07-081-17/+17
| | | | | | | | Replace old license header with correct one. Change-Id: I492ddaaa0227b2c8faf11bdcd6e12e7231a54a10 Reviewed-on: http://codereview.qt.nokia.com/1312 Reviewed-by: Jyri Tahtela <jyri.tahtela@nokia.com>
* Clean up addTextDecorations codeJiang Jiang2011-06-291-31/+53
| | | | | | | | | Try avoid using QRawFont::fromFont since it requires shaping on Mac. Change-Id: I90cc177662ecf6d0a95e722cdd0b06a01e5d0eaa Reviewed-on: http://codereview.qt.nokia.com/793 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Merge branch 'qtquick2' of scm.dev.nokia.troll.no:qt/qtdeclarative-stagingAaron Kennedy2011-06-241-16/+28
|\ | | | | | | | | Conflicts: src/declarative/items/qsgtextnode.cpp
| * Merge multiple lines of text into a single geometry nodeGunnar Sletta2011-06-231-10/+20
| | | | | | | | | | | | | | | | | | Long term, we might want to have this kind of logic in the QSGGeometry class through a grow() function or in the QSGRenderer, but we only have this one usecase where it actually makes sense right now, so I'm keeping it local. Change-Id: Ibbb0dd4a6e4b587154e26ffc2a34375fbb4a571d
| * Merge branch 'master' into qtquick2Gunnar Sletta2011-06-151-6/+4
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/declarative/scenegraph/coreapi/qsgdefaultrenderer.cpp src/declarative/scenegraph/coreapi/qsgdefaultrenderer_p.h tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp Change-Id: Id2267925c4f77b41f63bbbf555b816ca1f55a0ec
| * | Fix Text's underline, overline and strikeout properties for plain text.Yoann Lopes2011-06-011-14/+9
| | |
* | | Fix text decoration position for simple Text nodeJiang Jiang2011-06-211-1/+2
| |/ |/|
* | Use linked list instead of QList for node children.Kim Motoyoshi Kalland2011-06-101-6/+4
|/
* Revert "Make QSGTextNode back-end for QML's TextInput"Martin Jones2011-05-271-238/+12
| | | | This reverts commit e430f1336881850a73a54a291e0276160d568212.
* Make QSGTextNode back-end for QML's TextInputEskil Abrahamsen Blomfeldt2011-05-231-12/+238
| | | | | | | To get the benefit of different glyph node backends, the TextInput item has now been moved over on SceneGraph's TextNode instead of QPainter, and selections and decorations are painted using QSGSimpleRects.
* Update to work with QGlyphs -> QGlyphRun renamingEskil Abrahamsen Blomfeldt2011-05-101-7/+7
| | | | | Just some search replace to make the repository compile after QGlyphs and related APIs were renamed.
* Make text align in the same baselineJiang Jiang2011-04-291-8/+8
| | | | (cherry picked from commit 3f0e1ac647cc8ab700b85772264bc2a95e5301fa)
* Initial import from qtquick2.Qt by Nokia2011-04-271-0/+457
Branched from the monolithic repo, Qt qtquick2 branch, at commit a4a585d2ee907746682846ae6e8a48e19deef469