Version: 0.7-beta1 (using KDE 3.3.1, SuSE) Compiler: gcc version 3.3.1 (SuSE Linux) OS: Linux (i686) release 2.6.6 In CVS thumbnails are no longer drawn on top of the picture they refer to, and this is very good. But there is a regression, now sometimes the tooltip is drawn with the upper part off screen.
is there a specific set of conditions under which you can reproduce this. in the implementation, tooltip is repositioned once the text for it is laid out, so that the tooltip lies within the screen edges
Now that I tried to reproduce it I almost thought I could not, but I can reproduce it: With thumbnails 160x160, and three in a row, it happens after the 420th picture, 140th row. The tooltip is always shown above the picture, even if it is entirely off screen.
CVS commit by pahlibar: reposition tooltip with global mapping with respect to viewport. fixes tooltips being moved out of screen in case of very large content rect BUG: 92350 M +5 -3 albumfiletip.cpp 1.15 --- kdeextragear-3/digikam/digikam/albumfiletip.cpp #1.14:1.15 @@ -95,6 +95,6 @@ void AlbumFileTip::reposition() QRect rect = m_iconItem->rect(); - QPoint off = m_view->mapToGlobal( m_view->contentsToViewport( QPoint( 0, 0 ) ) ); - rect.moveBy( off.x(), off.y() ); + rect.moveTopLeft(m_view->contentsToViewport(rect.topLeft())); + rect.moveTopLeft(m_view->viewport()->mapToGlobal(rect.topLeft())); QPoint pos = rect.center(); @@ -130,9 +130,11 @@ void AlbumFileTip::reposition() { // above - pos.setY( rect.top() - height() ); + pos.setY( rect.top() - height() - 5); m_corner += 2; } else + { pos.setY( rect.bottom() + 5 ); + } move( pos );