Bug 425047 - Trash icon should reflect if trash is full or empty
Summary: Trash icon should reflect if trash is full or empty
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Albums-Trash (show other bugs)
Version: 7.7.0
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-05 18:02 UTC by Nicofo
Modified: 2022-07-13 20:24 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 8.0.0


Attachments
Trash icons (87.47 KB, image/png)
2020-08-05 20:46 UTC, Nicofo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nicofo 2020-08-05 18:02:06 UTC
SUMMARY
The trash icon in the Albums view always shows an "empty trash".
The icon should be a "full trash" if something is inside.
Comment 1 Maik Qualmann 2020-08-05 20:20:03 UTC
You are wrong it always shows a full trash. ((:-))
The difference between the two Breeze icons is so small that you will be disappointed. You can activate the item counter, then the number of items contained in the trash is also displayed, or a 0 if empty.

Maik
Comment 2 Nicofo 2020-08-05 20:46:46 UTC
Created attachment 130669 [details]
Trash icons

Really ? Seems empty to me ;)

See printscreen, done with 2 themes (Adwaita and Breeze).
- Trash of "Desktop" collection is in fact full
- Trash of "Photos" collection is in fact empty
- both icons are empty :(
Comment 3 caulier.gilles 2022-01-09 18:22:35 UTC
Hi Nicofo and happy new year,

With 7.5.0 we update KF5::Breeze icon to last stable 5.89. Can you double check if the AppImage fix this problem :

https://files.kde.org/digikam/

Thanks in advance

Gilles Caulier
Comment 4 Nicofo 2022-01-09 19:15:21 UTC
Hi Gilles and happy new year too !
I tested again -> same result: see attachment in comment #2
Best regards
Comment 5 Nicofo 2022-01-09 19:59:26 UTC
Additional info:

I think that the Trash icon's name is:
 - user-trash (empty trash)
 - user-trash-full (full trash)

I searched in the code for "user-trash" -> several matches
I searched in the code for "user-trash-full" -> no match (except in ChangeLog file)
--> So I guess digikam does not handle different icons for the Trash depending if it is full or empty.

In the matches for "user-trash", there is albumthumbnailloader.cpp:
QPixmap AlbumThumbnailLoader::getStandardAlbumTrashIcon(RelativeSize relativeSize)
{
    return loadIcon(QLatin1String("user-trash"), computeIconSize(relativeSize));
}

Maybe should be changed there ?
QPixmap AlbumThumbnailLoader::getStandardAlbumTrashIcon(RelativeSize relativeSize)
{
    if .... //trash is empty
        return loadIcon(QLatin1String("user-trash"), computeIconSize(relativeSize));
    else
        return loadIcon(QLatin1String("user-trash-full"), computeIconSize(relativeSize));
}
Comment 6 Maik Qualmann 2022-07-13 20:24:05 UTC
Git commit 41098bf120a6fb75ed1754144b9b324b36087cb3 by Maik Qualmann.
Committed on 13/07/2022 at 20:22.
Pushed by mqualmann into branch 'master'.

add separate icon for empty and full trash
Breeze also knows "trash-empty" but the
icon is a bit too "thin" for me.
FIXED-IN: 8.0.0

M  +2    -1    NEWS
M  +22   -0    core/libs/album/engine/album.cpp
M  +5    -0    core/libs/album/engine/album.h
M  +14   -2    core/libs/album/engine/albumthumbnailloader.cpp
M  +1    -0    core/libs/album/engine/albumthumbnailloader.h
M  +1    -10   core/libs/models/albummodel.cpp

https://invent.kde.org/graphics/digikam/commit/41098bf120a6fb75ed1754144b9b324b36087cb3