Bug 406770 - Recent anti-aliasing change is causing black lines on HiDPI displays
Summary: Recent anti-aliasing change is causing black lines on HiDPI displays
Status: RESOLVED DUPLICATE of bug 373232
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
Depends on:
Reported: 2019-04-22 13:47 UTC by Bo Simonsen
Modified: 2019-10-02 21:31 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In:

screenshot of mc after antialiasing change (270.07 KB, image/png)
2019-04-22 13:47 UTC, Bo Simonsen

Note You need to log in before you can comment on or make changes to this bug.
Description Bo Simonsen 2019-04-22 13:47:18 UTC
Created attachment 119556 [details]
screenshot of mc after antialiasing change


The commit ed5fa1f855a05ba82fe4f2f6d3ead803aa5eefdb introduced painter antialiasing which added unwanted black lines in programs like mc, iptraf-ng, etc, i.e. console applications with colored background when running with a scale factor e.g. 1.5. I would suggest to only use antialiasing in the painter when scaling is not activated until a real fix is there.

Commenting out TerminalDisplay.cpp:1262 fixes the problem (but reintroduces #397985, so a real fix is needed), the line:

    paint.setRenderHint(QPainter::Antialiasing, _antialiasText);

1. Set scale to 1.5
2. Start konsole
3. Run mc


Black lines under every row


A clean look

KDE Plasma Version: 5.12.8
KDE Frameworks Version: 5.55.0
Qt Version: 5.9.7

Konsole master gives the result in the screenshot

Comment 1 Bo Simonsen 2019-04-28 16:22:39 UTC
This will probably fix it, but not provide antialiasing for hidpi displays:

-    paint.setRenderHint(QPainter::Antialiasing, _antialiasText);
+    if(qApp->devicePixelRatio() == 1.0) {
+        paint.setRenderHint(QPainter::Antialiasing, _antialiasText);
+    }

But could be nice with a real fix.
Comment 2 Nate Graham 2019-04-28 17:08:23 UTC
It couldn't hurt to submit that as an RFC patch. :) You might get comments that could help with the cases that aren't yet covered.

here's the documentation: https://community.kde.org/Infrastructure/Phabricator
Comment 3 Christoph Cullmann 2019-10-02 21:31:40 UTC
I did this now in bug 373232, the important thing is the text aliasing anyways.
Tested on hi-dpi, looks much better for me, but more artifacts at the border of painted regions are still there :/

*** This bug has been marked as a duplicate of bug 373232 ***