KateStatusBar: Show lock icon on modified label when in read-only mode
ClosedPublic

Authored by loh.tar on Mar 4 2019, 1:59 PM.

Details

Summary

This may not needed because the information is already shown as part of the
inputMode label, on the other hand is that information there somehow misplaced.

Test Plan

You see the little lock bottom left?

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped
loh.tar created this revision.Mar 4 2019, 1:59 PM
Restricted Application added projects: Kate, Frameworks. · View Herald TranscriptMar 4 2019, 1:59 PM
Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel. · View Herald Transcript
loh.tar requested review of this revision.Mar 4 2019, 1:59 PM

You will notice that not all possible switch cases are checked. Should you like this patch in general I will review this depending on D19511.

cullmann requested changes to this revision.Mar 4 2019, 6:40 PM
cullmann added a subscriber: cullmann.

I think the lock icon won't hurt.

For the implementation: isn't it enough to watch for the readWriteChanged(...) signal of the document and trigger the modifiedChanged() changed there?

This revision now requires changes to proceed.Mar 4 2019, 6:40 PM
ngraham added a subscriber: ngraham.Mar 5 2019, 4:15 PM

Semi-relatedly: can we make this little bottom-left corner icon not not have a hover effect if it's not clickable, and have a tooltip when you hover over it so you can figure out what it means? It appeared recently and I found myself very confused by it due to those issues.

Semi-relatedly: can we make this little bottom-left corner icon not not have a hover effect if it's not clickable, and have a tooltip when you hover over it so you can figure out what it means? It appeared recently and I found myself very confused by it due to those issues.

I agree, its currently a little odd. I plan to show some inview hint like done in goto bar and to add a save action, when modified. Objections to this? Tool Tips are bad, in most cases, and here especially .

Tooltips are used throughout KDE and are approved by our HIG. We can use one here.

Tooltips are used throughout KDE and are approved by our HIG. We can use one here.

I am not sure if tooltips are that great in the status bar.
You often hover over that during work and they disturb you then.

loh.tar updated this revision to Diff 53253.Mar 6 2019, 5:31 AM
  • Use signal KTextEditor::DocumentPrivate::readWriteChanged to update icon

Regarding icon, tooltip and save action, see also https://phabricator.kde.org/D17730#392331

cullmann accepted this revision.Mar 16 2019, 3:33 PM

Ok with this change.
You can commit yourself now, or?

This revision is now accepted and ready to land.Mar 16 2019, 3:33 PM
This revision was automatically updated to reflect the committed changes.

I had choose also an tooltip like most other apps do and there it work very well.