Bug 104031

Summary: Selected item should stay centered in thumbnail bar
Product: [Applications] digikam Reporter: Tom Albers <toma>
Component: Showfoto-ThumbsAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In: 7.6.0

Description Tom Albers 2005-04-16 19:42:30 UTC
Version:            (using KDE KDE 3.4.0)
Installed from:    Debian testing/unstable Packages

It would be nice if the active thumnail in the thumnail bar would stay centered.

Now it happens that you only see part of the selected thumnail when you have a lot of thumnails and going through them with pagedown.
Comment 1 Tom Albers 2005-08-22 21:22:35 UTC
SVN commit 452180 by toma:

Keep the thumbnail completely visible and the next one as well. I heard from the bugreporter that he is extremely happy and will buy a pizza for me.
BUG: 104031


 M  +5 -1      thumbbar.cpp  


--- trunk/extragear/graphics/digikam/libs/thumbbar/thumbbar.cpp #452179:452180
@@ -178,7 +178,11 @@
     d->currItem = item;
     if (d->currItem)
     {
-        ensureVisible(0,item->m_pos);
+        // We want the complete thumb visible and the next one.
+        // find the middle of the image and give a margin of 1,5 image
+        // When changed, watch regression for bug 104031
+        ensureVisible(0, (int)(item->m_pos+d->margin+d->tileSize*.5),
+                      0, (int)(d->tileSize*1.5+3*d->margin));
         item->repaint();
         emit signalURLSelected(item->url());
     }