Draw inlineNotes after drawing word wrap marker
ClosedPublic

Authored by davidre on Mar 7 2020, 3:30 PM.

Details

Summary

Normal text is column inlined so the word wrap marker even though drawn last doesn't go
over anything. Inline notes on the other hand can contain arbitrary content
especially not column aligned text and background. Drawing the marker over them
looks ugly.

Test Plan

Before:


After:

Diff Detail

Repository
R39 KTextEditor
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidre created this revision.Mar 7 2020, 3:30 PM
Restricted Application added projects: Kate, Frameworks. · View Herald TranscriptMar 7 2020, 3:30 PM
Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel. · View Herald Transcript
davidre requested review of this revision.Mar 7 2020, 3:30 PM
davidre retitled this revision from Draw inlineNotes after drawing caret to Draw inlineNotes after drawing word wrap marker.Mar 7 2020, 3:31 PM
davidre edited the summary of this revision. (Show Details)
davidre edited the test plan for this revision. (Show Details)
davidre added a reviewer: KTextEditor.
davidre edited the summary of this revision. (Show Details)
brauch accepted this revision.Mar 7 2020, 3:39 PM
brauch added a subscriber: brauch.

Looks good, thanks! Yes, it's an improvement.

This revision is now accepted and ready to land.Mar 7 2020, 3:39 PM
This revision was automatically updated to reflect the committed changes.
cullmann reopened this revision.Mar 7 2020, 4:28 PM
cullmann added a subscriber: cullmann.

Hi, could it be that killed the inline notes autotest?

https://build.kde.org/job/Frameworks/job/ktexteditor/job/kf5-qt5%20SUSEQt5.12/313/

This revision is now accepted and ready to land.Mar 7 2020, 4:28 PM

Hi, could it be that killed the inline notes autotest?

https://build.kde.org/job/Frameworks/job/ktexteditor/job/kf5-qt5%20SUSEQt5.12/313/

Sorry I will take a look

FAIL!  : InlineNoteTest::testInlineNote() Compared values are not the same
Actual   (newCoordCol04): QPoint(51,1)
Expected (coordCol04)   : QPoint(33,1)

I have node idea why the test would be failing. It complains that a coordinateToCursor changed. My idea what could cause this that an inlineNote is inserted at not the exprected place so column 4 shifts to the right. However the change in the painting order shouldn't cause this as far as I understand it. To make matters worse the test passes for me locally. I would need help here to invesitagte or I would revert this for the moment.

brauch added a comment.Mar 7 2020, 5:43 PM

I also don't understand this. Even if the painting somehow changes, e.g. because some painter state is set which wasnt set before (which I do not see to be the case here), that should not affect the line layout, as that is computed separately.

Very strange.

I also don't understand this. Even if the painting somehow changes, e.g. because some painter state is set which wasnt set before (which I do not see to be the case here), that should not affect the line layout, as that is computed separately.

Very strange.

Yes I have the same thoughts. Maybe someone could trigger a rebuild, maybe it was just a fluke?

cullmann closed this revision.Mar 7 2020, 9:09 PM

Hmm, yes, seems to work again.
Let's close this then again.