D20742: Paint the folding marker in propper color and make it more visible
loh tar
noreply at phabricator.kde.org
Mon Apr 22 18:52:04 BST 2019
loh.tar created this revision.
loh.tar added a reviewer: KTextEditor.
Herald added projects: Kate, Frameworks.
Herald added subscribers: kde-frameworks-devel, kwrite-devel.
loh.tar requested review of this revision.
REVISION SUMMARY
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
F6787435: 1555954064.png <https://phabricator.kde.org/F6787435>
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.setCosmetic(true);
pen.setStyle(Qt::DashLine);
pen.setDashOffset(xStart);
+ pen.setWidth(2);
paint.setPen(pen);
- 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);
paint.setRenderHints(backupRenderHints);
}
REPOSITORY
R39 KTextEditor
REVISION DETAIL
https://phabricator.kde.org/D20742
AFFECTED FILES
src/render/katerenderer.cpp
To: loh.tar, #ktexteditor
Cc: kwrite-devel, kde-frameworks-devel, #ktexteditor, domson, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190422/0184f19a/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list