Fix ibeam and underline cursor rendering

Authored by wbauer on Mar 4 2019, 2:59 PM.

Description

Fix ibeam and underline cursor rendering

Summary:
Since anti-aliasing was enabled in the painter, coordinates need to
be shifted half a pixel so that they align with the pixel grid,
otherwise the result gets "blurred" due to the anti-aliasing.
And as parts of the blurred shape leak outside the cursor rectangle,
this also leaves artifacts when the cursor moves or blinks as these
parts are not cleared.

This is basically the same as commit
e7085310d6d594823d0ed491fa8bdbd99dec4932 for the
standard block cursor.

BUG: 402589

Test Plan:

  • Switch cursor shape to "I-Beam" or "Underline" in the "Advanced"

profile settings

The cursors are a single line again now, before they were blurred by
anti-aliasing.

Screenshots:
Before:


After:


Also, there are no more artifacts when the cursor is moved or
cursor blinking is enabled.

Reviewers: Konsole, hindenburg

Reviewed By: Konsole, hindenburg

Subscribers: hindenburg, konsole-devel

Tags: Konsole

Differential Revision: https://phabricator.kde.org/D19513

Details

Committed
hindenburgMar 5 2019, 2:37 PM
Reviewer
Konsole
Differential Revision
D19513: Fix ibeam and underline cursor rendering
Parents
R319:2e7270180688: Change Q_FOREACH to correct for usage
Branches
Unknown
Tags
Unknown