Give more useful information on tab title area
ClosedPublic

Authored by scottpetrovic on Oct 20 2017, 7:42 PM.

Details

Summary

This removes the display name of the image from the title area...and replaces it with the memory being consumed by the document. This is more helpful when there are multiple documents open.

I also replaced the "*" with the word modified. That is a bit more clear than a symbol. We did something similar not too long ago with the brush editor.

reference task: https://phabricator.kde.org/T7224

Test Plan

tested it out with multiple documents. added layers, added files, closed files, closed the application. It seemed to work ok and updated the title area appropriately.

Diff Detail

Repository
R37 Krita
Lint
Lint Skipped
Unit
Unit Tests Skipped
scottpetrovic created this revision.Oct 20 2017, 7:42 PM
dkazakov accepted this revision.Oct 23 2017, 2:23 PM
dkazakov added a subscriber: dkazakov.

The patch looks and works fine. I have only a minor comment, which I wrote inline. Please push! :)

libs/ui/KisMainWindow.cpp
762

There is no need to use NULL to compare normal integers, not pointers.

And even for pointers it is a bit more convenient to just write:

if (m_fileSizeStats.imageSize) {
    ...
}

The tradition to use NULL has come from the C-world (and WinAPI), because of more strict rules of C about pointers. In C++ it is perfectly normal to write int *ptr = 0 and it will not cause any troubles. And in this particular case NULL looks really weird, because imageSize is not even a pointer :)

This revision is now accepted and ready to land.Oct 23 2017, 2:23 PM
scottpetrovic closed this revision.Oct 24 2017, 6:35 PM

Thanks for the review (and the background info on NULL). I just made the update and pushed it out