Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.6.2, 5.9.1
-
None
Description
When setting a background color for parts of a text through QTextCharFormat on the text layout, it often happens that the background is a pixel too short on the right side.
This depends a bit on the font, and size, and the devicePixelRatio. I ran the attached example on macOS, devicePixelRatio 1, but the effect is not limited to that platform.
Also, the text selection leaves 1-pixel gaps between lines.
The screenshot from Qt Creator is a project wide search with ctrl+shift+f with https://codereview.qt-project.org/200293 (and dependency) applied, which changes the highlighted text to be painted with formats on the text layout instead of manually. The same can also be observed in Qt Creator when setting the background color for the different parts of the highlighting in Preferences > Text Editor > Fonts & Colors.
Attachments
Issue Links
- is required for
-
QTCREATORBUG-9445 Show whitespaces in diff editor
- Open