Created attachment 69891 [details] Correct case without horizontal scrolling Dolphin uses QGraphicsView internally for its new view-engine. When the details-view is turned on, Dolphin internally needs to implement a custom "header" for the columns and it does it in a similar way like the QWidget-based QListView from Qt by doing a style()->drawControl(QStyle::CE_Header, &option, painter, widget); However when horizontally moving the content, it seems that Oxygen uses a wrong clipping rectangle (see screenshot). The issue does not occur if e.g. Plastique is used. Also manually drawing a rectangle instead works fine. So to me it looks like an issue in the Oxygen-style but probably it is Dolphin's fault because some information is not passed or something like that... Anyhow: Any feedback would be very welcome :-) To reproduce: - Open Dolphin - Switch to "details view" (-> name, size and date is shown per default) - Increase the width of the name-column so that the size- and date-column are only partly visible and a horizontal scrollbar is shown - Scroll to the right Expected result: The header of size and date is drawn correctly Actual result: The header background stays white
Created attachment 69892 [details] Incorrect case with horizontal scrolling
@Hugo: I forgot: The drawing is done inside kde-baseapps/dolphin/src/kitemviews/kitemlistheaderwidget.cpp in the method KItemListHeaderWidget::paintRole() https://projects.kde.org/projects/kde/kde-baseapps/repository/revisions/master/entry/dolphin/src/kitemviews/kitemlistheaderwidget.cpp#L364 Probably you already see whether this is fine or not. Thanks!
Hello Peter, Interestingly, I can only reproduce the issue with kde-baseapps from trunk, and not from 3176142509e8be1100135c0a3919975f9d05ca9e (which is the revision I had before today's update). This with the same (latest) version of oxygen (via kde-workspace) Is it a "known" addition to the code, or a regression ? Anyway, after looking at the code, the issue comes from the fact that the header background is not repainted when scrollbar moves (nor when the window is resized). This has no impact on styles that paint a flat background on the header (as plastique), and paint it on the entire widget, even its hidden parts. It does impact oxygen, because we don't paint on hidden regions, in order to have the background "synchronized" with the main background (see: http://wstaw.org/m/2012/03/26/plasma-desktopGw2691.png) I can have a work around in oxygen (forcing the painting also on the "invisible" part, but you would still have issues such as in "http://wstaw.org/m/2012/03/26/plasma-desktopcN2691.png" (see the desynchronized background) This, I have no way to fix in oxygen (since I get no repaint events). So I would prefer dolphin to call more repaint events, than oxygen adding not so correct workarounds. Especially since "normal" list views behave the right way ... Feedback welcome
Thanks Hugo for your feedback - please give me a little bit time to check what I can do on Dolphin side (your hints are already very useful). I'm reassigning it back to Dolphin and will let you know if I found a solution :-)
Sounds good ! keep me posted !
From what I can see, QTreeView puts its QHeaderView in the margin section (see QAbstractScrollArea::setViewportMargins). I am not sure if it is scrolled together, independently, or not at all (i.e. only repainted at a new position). Will check later.
@Hugo + Christoph: Just a short update - I could resolve the issue on Dolphin side but need to fix some related issues first before committing the patch. The trick was to not move the position of the header-widget itself but to just change the x-alignment of the column-headers. So now the header-widget itself won't change its position when doing a horizontal scrolling, only the content is adjusted.
Git commit 270e0c3e489218ae5543c72e5ec643ba2ee9de3a by Peter Penz. Committed on 01/04/2012 at 16:42. Pushed by ppenz into branch 'master'. Allow showing Nepomuk metadata inside views Metadata like image-size, rating, comments, tags, ... can be shown now in the view (e.g. as column in the Details mode). Still open: The rating-information needs to be shown as stars. In the context of this feature also the following bugs have been fixed: - Fix visual glitches in the header of the Details mode - Improve the minimum column width calculation to respect also the headling and not only the content FIXED-IN: 4.9.0 M +11 -9 dolphin/src/CMakeLists.txt M +60 -63 dolphin/src/kitemviews/kfileitemlistwidget.cpp M +10 -11 dolphin/src/kitemviews/kfileitemlistwidget.h M +35 -35 dolphin/src/kitemviews/kfileitemmodel.cpp M +10 -0 dolphin/src/kitemviews/kfileitemmodel.h M +36 -0 dolphin/src/kitemviews/kfileitemmodelrolesupdater.cpp M +8 -0 dolphin/src/kitemviews/kfileitemmodelrolesupdater.h M +20 -10 dolphin/src/kitemviews/kitemlistheaderwidget.cpp M +4 -0 dolphin/src/kitemviews/kitemlistheaderwidget_p.h M +27 -13 dolphin/src/kitemviews/kitemlistview.cpp A +153 -0 dolphin/src/kitemviews/knepomukrolesprovider.cpp [License: GPL (v2+)] A +66 -0 dolphin/src/kitemviews/knepomukrolesprovider_p.h [License: GPL (v2+)] M +24 -0 dolphin/src/settings/additionalinfodialog.cpp M +1 -0 dolphin/src/views/dolphinitemlistcontainer.cpp M +25 -2 dolphin/src/views/dolphinview.cpp M +21 -0 dolphin/src/views/dolphinviewactionhandler.cpp http://commits.kde.org/kde-baseapps/270e0c3e489218ae5543c72e5ec643ba2ee9de3a