aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/utils/plaintextedit/plaintextedit.h
Commit message (Collapse)AuthorAgeFilesLines
* Utils: avoid using QFontMetricsF::lineSpacing for block offsetDavid Schulz2025-09-241-0/+1
| | | | | | | | | | | | QScriptLine that is used in the QTextLayout implementation only takes positive leading into account when calculating the line height. If we assume the QFontMetricsF::lineSpacing as the offset for unlayouted blocks we get a lot unnecessary updates during the layout process. So provide a static function in PlainTextDocumentLayout that provides a lineSpacing that is closer to the lineSpacing in a plain text document. Change-Id: I0ee114cf29f8a2fcbd5a2efe3fcea636a98c7739 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Utils: ensure the offset cache is cleared after block size changesDavid Schulz2025-09-241-0/+5
| | | | | | | | | | If the size of a layouted block is different than our assumed block size we need to make sure that the offset cache is cleared for all items that follow this block, otherwise the adjust scrollbar call uses wrong offsets wich results in wrong scrollbar ranges. Change-Id: I245e12e2b1b2c7822079f61e42b5bf18f617a168 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* TextEditor: Fix embedded Widget positioningMarcus Tillmanns2025-09-081-1/+2
| | | | | Change-Id: If3267f6fca4a2abbcb4d4917653f814209283ea4 Reviewed-by: David Schulz <david.schulz@qt.io>
* Utils: introduce additional layout items per block layoutDavid Schulz2025-08-281-4/+8
| | | | | Change-Id: Idceed0491f610637d38defece1643686f95151d5 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Editor: use one layout per editor instead of per documentDavid Schulz2025-07-181-3/+32
| | | | | | | | | This allows to wrap one document differently in editors with a different width. In the future this will allow us also to display additional information in just a single editor. Change-Id: Ie1a07517be8756c473207e0db58f7d9924fdb5b1 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* DiffEditor: fix jumping to selected file from toolbar dropdownDavid Schulz2025-06-191-0/+1
| | | | | Change-Id: I968ddc798c6f66072947031bab2dd3855a99bdee Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Utils: Minor adaption after change to plaintextedit forkChristian Stenger2025-04-301-1/+1
| | | | | | | | | | Accessing the cursorRect function is needed in some cases for the Squish tests. Amends cfc26cdf79b94888c1759636eff548b2378f93f3. Change-Id: I58e602c1b4c4ab918166ffa758f0675203619d81 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: hjk <hjk@qt.io>
* Editor: fix squish testsDavid Schulz2025-04-291-1/+2
| | | | | | | | | | | | Changing the base of TextEditor::TextEditorWidget from QPlainTextEdit to Utils::PlainTextEdit made some functions of the base class inaccessible for squish. So we need to use the properties or make the used functions available via Q_PROPERTY. Fixes: QTCREATORBUG-32776 Change-Id: Ie3c45b2de958a9b82a4b4323558830c993187c52 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* Utils: Fix warningsMarcus Tillmanns2025-04-081-1/+1
| | | | | Change-Id: Ibc8eb9b5aac4329cc38f4e8e0421d17d8628d2bf Reviewed-by: David Schulz <david.schulz@qt.io>
* Editor: Fork QPlainTextEditDavid Schulz2025-04-021-0/+287
The layout of a text editor is part of the document and not the editor. This results in not being able to position blocks differently in multiple editors. As a first step fork QPlainTextEdit with all the private dependencies. Change-Id: Ie2da2613a966fe1958b6dbade4b7ff40e8858f62 Reviewed-by: Eike Ziller <eike.ziller@qt.io>