Paint the folding marker in propper color and make it more visible

Authored by loh.tar on Apr 22 2019, 5:52 PM.



Prior to this patch was the line in a color of the word wrap marker painted, now its the folding color.
The line was, at least here, always hard to see, so it's now painted thicker and slightly more above.
To avoid the line will overpaint the text is the code moved up, before the text painting.

Test Plan

For your convenience the raw change before the lines are moved up

@@ -886,12 +886,13 @@ void KateRenderer::paintTextLine(QPainter &paint, KateLineLayoutPtr range, int x
    if (!(flags & SkipDrawFirstInvisibleLineUnderlined) && range->startsInvisibleBlock()) {
        const QPainter::RenderHints backupRenderHints = paint.renderHints();
        paint.setRenderHint(QPainter::Antialiasing, false);
-        QPen pen(config()->wordWrapMarkerColor());
+        QPen pen(config()->foldingColor());
+        pen.setWidth(2);
-        paint.drawLine(0, (lineHeight() * range->viewLineCount()) - 1, xEnd - xStart, (lineHeight() * range->viewLineCount()) - 1);
+        paint.drawLine(0, (lineHeight() * range->viewLineCount()) - 2, xEnd - xStart, (lineHeight() * range->viewLineCount()) - 2);

Diff Detail

R39 KTextEditor
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
loh.tar created this revision.Apr 22 2019, 5:52 PM
Restricted Application added projects: Kate, Frameworks. · View Herald TranscriptApr 22 2019, 5:52 PM
Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel. · View Herald Transcript
loh.tar requested review of this revision.Apr 22 2019, 5:52 PM
cullmann accepted this revision.Apr 22 2019, 6:09 PM
cullmann added a subscriber: cullmann.

Both diff + output change in the screenshot look reasonable for me.

This revision is now accepted and ready to land.Apr 22 2019, 6:09 PM
This revision was automatically updated to reflect the committed changes.