Bug 261568

Summary: ICONVIEW : scale overlay action icons accordingly with thumb size [patch]
Product: [Applications] digikam Reporter: Todd <toddrme2178>
Component: Usability-OverlayAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: caulier.gilles, metzpinguin
Priority: NOR    
Version: 1.7.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 4.14.0
Attachments: Comparison of icon scaling in digikam and dolphin
iconsize.patch
iconsize2.patch

Description Todd 2010-12-29 21:46:28 UTC
Version:           1.7.0 (using KDE 4.5.90) 
OS:                Linux

Digikam has certain actions you can do when you put your mouse over a thumbnail in the picture list view.  These include selecting/deselecting the picture, rotating it clockwise, or rotating it counterclockwise.  

However, these icons are always the same size.  When the thumbnails are small, the icons are small, which makes sense.  However, when the thumbnails are large the icons stay small, giving them a really small hit target relative to the size of the thumbnail.  Dolphin has a similar icon, but rescales it, to an extent, with the size of the picture.  I think this would be helpful and would make the icons more useful in digikam as well.

Reproducible: Always
Comment 1 caulier.gilles 2010-12-29 22:14:55 UTC
It's a strange behavior. I never see it. Can you take screen-shots as example please ?

Gilles Caulier
Comment 2 Todd 2010-12-29 23:25:12 UTC
Created attachment 55362 [details]
Comparison of icon scaling in digikam and dolphin

Screenshots of Dolphin and Digikam showing the issue.  The import part is the "+" icon near the upper-right corner for both Dolphin and Digikam and the rotate left and rotate right icons to the right of the "+" icon in Digikam.

The left two screenshots show the what you get in each program when the thumbnail is very small, the right when the icon is very large.  

Notice that for Dolphin (top two pictures), in the left picture the "+" icon is small while in the right picture the "+" icon is large.  

However, for digikam (bottom two pictures), in the left picture and right picture the "+" icons are the same size, as are the rotate left and rotate right pictures.
Comment 3 Marcel Wiesweg 2010-12-29 23:44:38 UTC
Maybe you need KDE 4.5, but it's a known feature of dolphin, easy to test. I heard Peter Penz talk about it, I think it was requested by users.
Personally, I have a feeling that sometimes the icons get a bit too large for a good visual impression, visually I'd prefer smaller ones, or only two steps, like 16+22. But yes, it is technically possible.
Comment 4 caulier.gilles 2011-12-13 10:06:34 UTC
It still valid with KDE 4.7.x and digiKam 2.4 ?

Gilles Caulier
Comment 5 Todd 2011-12-18 10:00:28 UTC
Yes, it is.
Comment 6 caulier.gilles 2015-08-31 11:45:37 UTC
Maik,

I partially identified in source code where icon size are hard-coded :

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/entry/libs/widgets/itemview/itemviewhoverbutton.cpp#L160

Into digikam 4, icons size is set to KIconLoader::Desktop, into digikam 5 it's 48.

Gilles
Comment 7 Maik Qualmann 2015-09-02 10:39:05 UTC
Created attachment 94343 [details]
iconsize.patch

This is a first patch for viewing and testing. Changes to the import view contains not the patch.

Maik
Comment 8 caulier.gilles 2015-09-02 13:17:47 UTC
Maik,

The patch work very well. Congratulations.

Note : it cannot be applied now to git/master. 4.13.0 release will be tarballed this evening by Nicolas Lécureuil. Please delay this patch and future one for 4.14.0 release.

Gilles
Comment 9 Maik Qualmann 2015-09-06 06:52:16 UTC
Created attachment 94422 [details]
iconsize2.patch

Final version of the patch to commit.

Maik
Comment 10 Maik Qualmann 2015-09-06 06:55:19 UTC
Git commit 99648053a70455f1c99ca715ccbcc9851d02509a by Maik Qualmann.
Committed on 06/09/2015 at 06:52.
Pushed by mqualmann into branch 'master'.

apply patch #94422 to scale the overlay action icons accordingly with thumb size
FIXED-IN: 4.14.0

M  +3    -2    NEWS
M  +6    -4    app/items/overlays/imagerotationoverlay.cpp
M  +4    -2    app/items/overlays/imageselectionoverlay.cpp
M  +6    -5    libs/widgets/itemview/itemviewhoverbutton.cpp
M  +6    -4    utilities/importui/items/importoverlays.cpp

http://commits.kde.org/digikam/99648053a70455f1c99ca715ccbcc9851d02509a
Comment 11 caulier.gilles 2015-09-06 08:58:06 UTC
Git commit 5f2bf2fa336bf7afa966587635591f0446a74b5f by Gilles Caulier.
Committed on 06/09/2015 at 08:57.
Pushed by cgilles into branch 'frameworks'.

backport commit #99648053a70455f1c99ca715ccbcc9851d02509a from git/master to frameworks branch

M  +4    -2    app/items/overlays/imagerotationoverlay.cpp
M  +3    -1    app/items/overlays/imageselectionoverlay.cpp
M  +6    -6    libs/widgets/itemview/itemviewhoverbutton.cpp
M  +4    -2    utilities/importui/items/importoverlays.cpp

http://commits.kde.org/digikam/5f2bf2fa336bf7afa966587635591f0446a74b5f
Comment 12 caulier.gilles 2015-09-06 09:14:16 UTC
Git commit ea4241cd87bcb347026975338cc3bbeda4cb9da2 by Gilles Caulier.
Committed on 06/09/2015 at 09:13.
Pushed by cgilles into branch 'master'.

adjust face rejection overlay icon size to be dynamic with thumbnail size

M  +8    -6    app/items/overlays/facerejectionoverlay.cpp
M  +2    -2    app/items/overlays/facerejectionoverlay.h

http://commits.kde.org/digikam/ea4241cd87bcb347026975338cc3bbeda4cb9da2
Comment 13 caulier.gilles 2015-09-06 09:17:24 UTC
Git commit c7833dfc57e49fc48c26fb0605d77859f7126afd by Gilles Caulier.
Committed on 06/09/2015 at 09:16.
Pushed by cgilles into branch 'frameworks'.

backport commit #ea4241cd87bcb347026975338cc3bbeda4cb9da2 from git/master to frameworks branch

M  +8    -6    app/items/overlays/facerejectionoverlay.cpp
M  +2    -2    app/items/overlays/facerejectionoverlay.h

http://commits.kde.org/digikam/c7833dfc57e49fc48c26fb0605d77859f7126afd
Comment 14 caulier.gilles 2015-09-06 09:28:41 UTC
Maik,

It miss something to patch : image coordinates overlay to draw world map icon over thumbnail with image has GPS info. Icon is show on top/right corner when right option is enabled on Setup/AlbumView panel.

The code relevant is a little bit different. There is an overlay implementation (imagecoordinateoverlay.cpp) but this one do not draw icon. It's done in image delegate implementation :

updateRects() from delegates calculate the rectangle d->coordinatesRect to host world map icon.

paint() from delegates call drawGeolocationIndicator() if image has GPS info.

ItemViewImageDelegate::drawGeolocationIndicator(), ItemViewImportDelegate::drawGeolocationIndicator(), 
ItemViewShowfotoDelegate::drawGeolocationIndicator()
are re-implemented to do the job.

This is implemented for album icon view, import icon view and showfoto thumb-bar.

Gilles
Comment 15 Maik Qualmann 2015-09-08 17:47:35 UTC
Git commit 3b82901ee4948b4316ab3b194ba30ddbb0804677 by Maik Qualmann.
Committed on 08/09/2015 at 17:42.
Pushed by mqualmann into branch 'master'.

info icons over thumbnails now scaled

M  +2    -2    app/items/digikamimagedelegate.cpp
M  +3    -2    app/items/imagethumbnaildelegate.cpp
M  +2    -2    libs/widgets/itemview/itemviewimagedelegate.cpp
M  +2    -2    utilities/importui/items/importdelegate.cpp
M  +5    -5    utilities/importui/items/itemviewimportdelegate.cpp

http://commits.kde.org/digikam/3b82901ee4948b4316ab3b194ba30ddbb0804677
Comment 16 caulier.gilles 2015-09-08 21:00:59 UTC
Git commit d325e7da9987748757678505ed966176874959fb by Gilles Caulier.
Committed on 08/09/2015 at 21:00.
Pushed by cgilles into branch 'frameworks'.

backport commit #3b82901ee4948b4316ab3b194ba30ddbb0804677 from git/master to frameworks branch

M  +12   -13   app/items/digikamimagedelegate.cpp
M  +1    -1    app/items/digikamimagedelegatepriv.h
M  +3    -1    app/items/imagethumbnaildelegate.cpp
M  +5    -3    libs/widgets/itemview/itemviewimagedelegate.cpp
M  +2    -2    utilities/importui/items/importdelegate.cpp

http://commits.kde.org/digikam/d325e7da9987748757678505ed966176874959fb