[Digikam-devel] [Bug 148572] show filename with each thumb/image in light table

Pieter Edelman p.edelman at gmx.net
Sun Aug 9 09:12:35 BST 2009


https://bugs.kde.org/show_bug.cgi?id=148572





--- Comment #16 from Pieter Edelman <p edelman gmx net>  2009-08-09 10:12:20 ---
Created an attachment (id=36007)
 --> (http://bugs.kde.org/attachment.cgi?id=36007)
Allow file name display in thumbnail bar

Ok, attempt 2 to help in solving this issue, this time for real ;)

There is not all that much room in the thumbnails to show the file names, so I
did quite a lot of experimenting and I think the following proposal is quite
satisfactory. It tries to utilize the available space as best as possible. The
option to show file names can be configured by the user from the digiKam setup
menu.

The first change regards the arrows that indicate which image is in which
preview pane. These are currently represented by small icons in the upper left
or upper right corner. This is a clear indication, but reserves quite a lot of
space that can’t be used for the file name. To keep a consistent look, this
space has to be reserved on every thumbnail, although an arrow is actually only
displayed on two thumbnails.
This patch replaces the icons by large semitransparant arrows on the thumbnails
themselves. They are black and white to provide enough contrast.
This freed space on top is now used to draw the image name. This is done
semitransparently, because it is sometimes not possible to completely prevent
overlapping between the thumbnail and the image name.

The next change is that this patch determines the available space on each tile
for displaying the title and adjust the layout based on that. The thumbnails
are all displayed on the same baseline (that is, their vertical centers are all
aligned) for aesthetic reasons, but if the thumbnail sizes allow it, this
baseline is shifted downwards to accommodate the file name above the image. The
default baseline is vertically centered on the tile, just like it is now).
This strategy is also followed for vertical thumbnail bars.

The next change may be a bit more controversial. The patch tries to balance the
thumbnail in the space between the file name on the top and the rating tool on
the bottom. However, I made the use of the rating tool in the thumbnail bar to
be a configurable option. When it is turned off, a bit of extra space becomes
available on the bottom.
To be honest, for me this presents a great opportunity to get rid of the rating
tool in the thumbnail bar :) I personally don’t use it, but I often end up
accidentally rating an image when I try to select it with my mouse. So for me
it gets really in the way and I would love to be able to turn it off. For me,
the image name is much, much more useful to have than the rating.

On some rare occasions, the baseline can jump to another position when the
thumb bar is drawn for the first time or when images are added or removed. This
only happens if the baseline needs to be shifted from the vertical center, so
when the thumbnails are zoomed to a very small position and the filenames are
very long.
The baseline can be only correctly determined when all thumbnails are loaded.
So it might happen that the thumbnails are drawn on a particular baseline, but
this is adjusted as more thumbnails are loaded. On my computer (an average
desktop pc), this usually happens in less than a second. This can also happen
after a (vertical) resize of the thumbnail bar, because the thumbnails are
loaded again.
Also, when an portrait thumbnail is added to a list of landscape thumbnails
(and the baseline is shifted downward), the baseline will jump back to the
center. This happens immediately. The opposite happens when the only portrait
thumbnail is removed from the list.

The ability to show/hide the file name and the rating tool are not implemented
in the light table classes but in its base class digikam/imagepreviewbar, which
is also used for the thumbnail bar in the normal image preview and the image
editor. This opens the possibility to enable these features also in these
places and I really think that it should be done, but I don’t know if the
config option should be made for all thumbnail bars or that it should be
separated for the light bar and the album/editor view. Right now, I haven’t
implemented it, but that’s a quite trivial change.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Digikam-devel mailing list