Discussion:
[kate] [Bug 391518] New: Cursor width in Kate gets narrower every 16 characters
Add Reply
David de Cos
2018-03-07 12:28:21 UTC
Reply
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391518

Bug ID: 391518
Summary: Cursor width in Kate gets narrower every 16 characters
Product: kate
Version: 17.12.0
Platform: Neon Packages
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: NOR
Component: general
Assignee: kwrite-bugs-***@kde.org
Reporter: ***@ehu.eus
Target Milestone: ---

Created attachment 111245
--> https://bugs.kde.org/attachment.cgi?id=111245&action=edit
Two screenshots put together, where both widths can be seen

The width of the cursor in Kate depends on what column it is in. Most of the
times its quite thick, but at some places of the document it's narrower.

The column numbers where it is narrow are: 1, 17, 33, 49, 65, 81, 97... (i.e.
16*n+1)

It's not a severe bug, but I find it slightly annoying, and the fact that those
column numbers follow a mathematical pattern makes it interesting!
--
You are receiving this mail because:
You are watching all bug changes.
Christoph Feck
2018-03-29 22:45:57 UTC
Reply
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391518

Christoph Feck <***@kde.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |CONFIRMED
Ever confirmed|0 |1

--- Comment #1 from Christoph Feck <***@kde.org> ---
The issue is that QTextLayout uses QPainter::RasterOp_NotDestination, which
means all pixels that are affected by the cursor rect get inverted. Since the
cursor rect is positioned at fractional positions, usually 3 instead of 2
pixels get inverted.

I suggest to use setRenderHint(QPainter::Antialiasing, false) for the cursor.
This way, the rect rasterization will be pixel-aligned and only the intended 2
pixels get inverted.
--
You are receiving this mail because:
You are watching all bug changes.
Christoph Feck
2018-04-26 21:33:47 UTC
Reply
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391518

Christoph Feck <***@kde.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Keywords| |junior-jobs
--
You are receiving this mail because:
You are watching all bug changes.
Loading...