ViewConfig: Add 'Dynamic Wrap At Static Marker' option
ClosedPublic

Authored by loh.tar on Dec 18 2018, 6:52 PM.

Details

Summary

Without this patch is in "Dynamic Wrap Mode" the text always wrapped
at the outer end of the view, which may hinder the reading flow with
a wide screen.

Test Plan

Normal behaviour

With patch and activated option

Config page, no old one (sorry, but looks almost the same just without the new option)

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.
loh.tar created this revision.Dec 18 2018, 6:52 PM
Restricted Application added projects: Kate, Frameworks. · View Herald TranscriptDec 18 2018, 6:52 PM
Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel. · View Herald Transcript
loh.tar requested review of this revision.Dec 18 2018, 6:52 PM
  • No sure if there must be something at other places considered
  • This is my second version where the wrap is done ether at the static setting or the view width, whatever is smaller. At first is was always wrapped at the static setting. Then I thought it may this way better. But I'm still undecided, the other behaviour has also charm. Somehow fit now the naming no more perfect.
  • At first I thought there is now an issue with the static wrap marker (the line has gaps) and the highlighting when the first word is selected (span the unused space at the right) but that seams to be "normal"
  • Only poor tested!

I think the idea makes sense, thought I have no idea if the change in the updateView part is correct ;=)
Others?

cullmann accepted this revision.Dec 29 2018, 7:12 PM

I played with it, it seems to work reasonable well.
Lets give this patch a try ;=)
Its optional, if people get issues, we can try to fix them later. (I have seen no ones myself)

This revision is now accepted and ready to land.Dec 29 2018, 7:12 PM
This revision was automatically updated to reflect the committed changes.

Unfortunately, the change in the .ui file introduced bug https://bugs.kde.org/show_bug.cgi?id=403422

The minimum and maximum were set from 1...5 to -1...-1. Will post a followup patch.

@loh.tar Did you remove and add the slider manually again, or how did that happen?

PS: It seems we did a bad review job here ;)

src/dialogs/textareaappearanceconfigwidget.ui
187–197

I often struggle with QtCreator but I can't remember what happens there, sorry.