show image count in filter toolbox instead of hinter
fixes #10518

This allows the "hinter" to be hidden once one is comfortable enough with the mask/module controls to not need the reminder (which can also quickly be pulled up with "h").
Aside: the label widget in the filter toolbox that is used to display the selection is exposed using the same kind of proxy getter functions as the filter and sort box for consistency. I am not convinced there is much value in jumping through various levels of indirection to in the end expose very specific widgets in very specific modules, thereby completely breaking encapsulation anyway. As far as I'm concerned, just exposing the widget pointers directly, or even the module->data struct pointer and definition if that only contains 3 pointers, does not reduce any maintainability and in fact makes things more transparent. If any of the proxy interfaces are, at a later stage, more generically applicable (i.e. more than one module could use them) it could be refactored at that point. The complexity of the interface would then provide some indication of how widely used it might be, which at the moment is does not at all.
I like this, indeed the ability to hide the hints without loosing this information is a nice move to me.
I would even propose to rework the wording of this text as part of this PR as for small screen it will probably be a problem and it has always sounded too verbose to me.
Currently we have:
1 image of <nn> (#num) in current collection selected
or
2 images of <nn> in current collection selected
Why not just:
1 (#num) / nn selected
or
2 / nn selected
Maybe even using bold fonts for the numbers.
We always select images, we always select in current collection. If this is important it should be in the doc but having that on the UI takes spaces and is not really useful after some minutes of using dt.
Any other proposals?
@Nilvus : You may want to give your feedback on this. TIA.
it has always sounded too verbose to me.
I agree, but advocating for the devil, I would say that when it is printed in the hinter (which this PR still does if the filter bar is hidden) there could be confusion with selecting masks/nodes on a shape, because the hinter now mostly prints mask mouse usage tips. So maybe leave the old message in place there, or at least add " in current collection" at the end. And maybe still include "image/(s)" in the text, so in the bar: 1 image (#2) / 3 selected and in the hinter, where there's lots of space if we just print this message: 1 image (#2) / 3 selected in current collection
EDIT: on second thought the "x image / y selected" looks a little confusing (are y selected or x?) so I've pushed n image (#p) selected of m numbers are at start and end for quick scanning.
EDIT 2: of course I've seen #12611 but someone else may be better skilled to figure out the number of groups.
@Nilvus : You may want to give your feedback on this. TIA.
Just let me few days to test that and put feedback
All good to me. Just a little thing:
- select an image and see infos shown on filter on header bar depending on what's visible
- switch top things to show with 'shift+ctrl+t'
- see that where image count is shown update only when clicking again on the image (or another) but not when top panels shown are changed.
I think the update should be done when switching top panels shown
This is not unlike what happens if the hinter area temporarily shows some other information (for example mask shape scroll actions) and is then cleared; it will also not "go back" to showing selection information.
This could possibly addressed, but not necessarily as part of this PR. It should only be done if the hinter is empty, because if you actually toggled the top bar because you wanted to see if the hinter showed some information, you could inadvertently overwrite what you were looking for.
@TurboGit: just in case you miss that one but could be merged regarding last comment by @dterrahe on my little "issue" (and it's a really minor one. I rarely, as I suppose others users, change top panels on lighttable view).