Version: 1.0.0-beta3 (using 4.2.3 (KDE 4.2.3), MinGW 3.4.5) Compiler: gcc.exe OS: Microsoft Windows (i686) release 5.1 (XP Professional) When hovering the mouse over a picture a blue border appears around the picture, I guess to indicate that this is the picture under the mouse. This blue border does however not disappear when the mouse is moved to another picture so after moving the mouse around all images have this border. All border disappear when I do something else like select one image or scroll up or down until all blue borders are of screen. Single click on an image does not trigger the view/edit action as before. Instead I have to double click to trigger the action. Non of this issues are there when I run the same version under Ubuntu.
Someone showed me this staying-border problem during the coding sprint, so I guess it's still around. But I cannot reproduce this. So is anyone present who can reproduce this problem and is willing to compile with a few debug patches added? The single vs. double click behavior is controlled by Qt and determined by system settings.
I can confirm this for WindowsXP: Borders stay "open", click behavior is broken, but this is a more general problem, because in Linux it is the same. If you set Linux / KDE to have double-click behavior, the image can still be closed with a single click, but it will only show with a double click (very inconsistent).
I have two user accounts on my system, a regular one and a testuser. The testuser does not have the staying-border-problem, but the regular one does. I do not know exactly where their system settings are different, though... Qt 4.5.3, KDE 4.3.2 Michael
Forgot to mention that this is on linux...
The code drawing this border is located in imagedelegate.cpp, line 378: if (option.state & QStyle::State_MouseOver) { ... There is also a similar code block above (371) which is probably never used. I see these possibilities: Either the item is not redrawn when the mouse leaves, or the 371-code block is used, why ever. Or the MouseOver flag is erroneously set. It's a bit difficult to debug because the method is called for every QModelIndex and for each redraw, so quite often. You could use debug messages restricted to when a certain model index (e.g. row=0) is painted. There is ImageDelegate::mouseMoved to get info about where the mouse is.
Created attachment 38728 [details] Screenshot of border debugging Ok, this is how far I got: if (option.state & QStyle::State_MouseOver) { kDebug()<<"mouseover!!!"; r = d->rect; p->setPen(QPen(option.palette.color(QPalette::Highlight), 3, Qt::SolidLine)); p->drawRect(1, 1, r.width()-3, r.height()-3); } else { kDebug()<<"NOT mouseover!!!"; r = d->rect; p->setBrush(QBrush(Qt::black)); p->setPen(QPen(Qt::green, 3, Qt::SolidLine)); p->drawRect(1, 1, r.width()-3, r.height()-3); } With this code, all items are black with a green border by default (middle icon). Mouse over the icon on the left and over the one on the right in the screenshot -> it gets a blue border, debug output "mouseover". Move mouse away -> debug output "NOT mouseover", but the blue border stays, and you can see that the black brush is clipped to where the overlays are located, therefore the border was not erased... The black artefacts around the green border are drawn at the beginning of the function with a width of 5, and also don't erase the background of the blue border... Now execute the same code under a user account where the staying-border-problem does not occur, and there is no clipping, the black brush covers the entire inside of the green border when the mouse is moved away. So, how do we proceed? Marcel: The State_HasFocus branch is executed when an item has been selected with the mouse. Michael
Is the differing behavior dependent of digikam config (copying over the digikamrc, with backup ;-) ?) Can you check the painter's clipRegion(), maybe the current painting is not executed because it's clipped? The area to be painted is given by option.rect, is this one correct? The overlays are little widgets themselves, repositioned each time a new item is entered. That will explain why their region stays black, though I'm unsure about the exact mechanism.
Marcel, copying the digikamrc does not work for me, I always get the Configuration Wizard of Digikam when I try it. Clipping: QRegion(size=0), bounds = QRect(0,0 0x0) The options.rect is okay. Another oddity: If I block the installation of overlays in ImageDelegate::installOverlay, the testuser (without the staying borders problem) still works okay (without overlays), but for the regular user the mouseMove events do not lead to a repainting of the delegate (no debug messages from the ImageDelegate::paint function). Therefore I guess that whatever should trigger a repaint of the ImageDelegate on mouse moves is somehow broken there, but I could not figure it out. Michael
When copying the digikamrc you need to adjust the "Database File Path" setting. All other settings should not make the first-run wizard appear. (That's my first approach: If this is settings dependent, we can isolate which setting is the problem) The second question: When the mouse is moved away, is ImageDelegate::paint() called but with no effect, or is it not called at all? Make sure, when testing with more than one item in the view, to include the index's row() in the debug output to identify. If it's not called at all, the next level to check will be KCategorizedView::paintEvent().
The staying-borders problem appears to be caused by the 'Plastique' style. If I start KDE for a fresh user, the staying-borders problem is not there. Then I change the widget style from Oxygen to 'Plastique' in the System Settings and the staying-borders problem is there. Marcel, can you reproduce this? Michael
Yes that's it! Absolutely reproducable.
So to me it appears that when digikam is started with Plastique as style (changing while running may not show the effect), any paint operation on the view's viewport, done on an item after the mouse moved away from this item, is reverted (*). (*) I say reverted because on areas covered by transparent widgets, the effect of the paint operation is visible. Is Plastique coming from KDE or Qt? Should we change the component of this bug? If painting works with default styles but reproducibly not with a certain one, I would assume a problem with this style.
I can see painting issues in IconView for every style and theme in Linux, too. Just change the theme (from Default to Dark for example) and watch the iconview. It is not updated correctly, only when hovering over the items in the iconview. I need to close the current album and switch to another to make the iconview refresh its style.
So I guess it is more of a general problem in the iconview?
I just see a missing redraw. All newly painted items will be drawn with the new theme. Probably easy to fix. Out themes are not the problem here - it's an issue with a specific QStyle.
*** Bug 212108 has been marked as a duplicate of this bug. ***
Can someone reproduce this bug with 1.7.0 ? Julien
David, it still valid using digiKam 2.3.0 for windows ? Gilles Caulier
(In reply to comment #0) David and Andi, can you still reproduce this with the new digiKam 3.1.0 release? Here is a link to the installer: http://download.kde.org/stable/digikam/digiKam-installer-3.1.0-win32.exe
I tried with digiKam 3.5.0 under windows, and problem is not reproducible. I close this file... Gilles Caulier