Created attachment 67867 [details] scrollbar Version: unspecified OS: Linux title says it all. Consistency *is* important. Reproducible: Didn't try Steps to Reproduce: open systemesettings, workspace appearance. Expected Results: scrollbar should be consistent with widget style.
if you have an idea how to get Qt-styled scrollbars for QML based list views I'm quite open. Currently I don't see any solution.
http://qt-apps.org/content/show.php/Native+Quick+Widgets?content=137145 In general this is a major threat, because if we don't have a look and best come up with a generalized solution, the desktop will turn the more a mess the more qml is invoked :-(
> In general this is a major threat, because if we don't have a look and best > come up with a generalized solution, the desktop will turn the more a mess > the more qml is invoked :-( I quite agree and would love to have something like "normal" components using the Qt style in background. I would like to see a GSoC spent on something like that.
@Martin, no no real idea since I don't know anything of QML (and do not intend to) Concerning from Thomas link, I think it should go official first, and then some fixing is needed inside oxygen to have it work within such a solution. (and I could help/work on that). Aside from that, naively I'd try to force hide the scrollbars of the qml view, add some QScrollbars, and tie the two together with signals and slots (though I have no idea whether this is doable or not). Also note that the qml view feedback to scrolling, which is appropriate for tablets and plasma stuff, also feels quite innapropriate to me in the context of kcm (simply because no other view behaves the same). Like Thomas, I think this is a major issue (and I'm not sure GSoc is the right answer for it to be fixed). I'd actually consider the lack of a generic solution as a show stopper for embedding any (widget-like) QML into applications ...
QDeclarativeView inherits QGraphicsView inherits QAbstractScrollArea, so I it should be possible to get the standard scrollbars. Maybe not use a QML managed list, but a simple vertical layout as the contents?
> Maybe not use a QML managed list, but a simple vertical layout > as the contents? I will experiment a bit. Maybe a Row{} could work as it also operates on Models. What I also consider as a solution is using a custom QML element which embedds a ScrollWidget, but that really sucks in QML. But I also need a solution for the highlighted background. I would like to have there the normal QStyle layout. So summary: I will look into it. Not with highest priority but there will be a proper solution before it hits the users. I was completely aware of the inconsistency and decided to ship it nevertheless because of the improvements for the list rendering (quite a lot faster and interactive).
(In reply to comment #6) > What I also consider as a solution is using a custom QML element which embedds > a ScrollWidget, but that really sucks in QML. Wouldn't that kill all advances of the SceneGraph (like probably using a HUUUUGE declarative viewport inside a QWidget as Christoph suggested) - also fixing "those" scrollbars won't do, there must be a QML way to integrate into the system (and that also covers kinetic scrolling, do the scrollbars really act like dragging the view?) About GSoC ... well a) such solution should actually exist in Qt b) given our experiences with GSoC (not so much Artur, but *everyone* else @kwin) .... errr... errhemmm c) since the "S" isn't "Spring" it'd likely be too late for at least this item.
> > What I also consider as a solution is using a custom QML element which > > embedds a ScrollWidget, but that really sucks in QML. > > Wouldn't that kill all advances of the SceneGraph (like probably using a > HUUUUGE declarative viewport inside a QWidget as Christoph suggested) I was more thinking of using the QWiget based ScrollWidget to manipulate the flickable list view. > - also > fixing "those" scrollbars won't do, there must be a QML way to integrate > into the system (and that also covers kinetic scrolling, do the scrollbars > really act like dragging the view?) good point. At least the Plasma Components Scrollbars work in a sane way ;-) But there should be a consistant way to either have kinetic scrolling or not on desktop. > > About GSoC ... well > a) such solution should actually exist in Qt true, but we won't get that before Qt 5, so realisticly maybe 4.11 or 4.12 > b) given our experiences with GSoC (not so much Artur, but *everyone* else > @kwin) .... errr... errhemmm the Plasma Components GSoC seems to have worked well. > c) since the "S" isn't "Spring" it'd likely be too late for at least this > item. also true
Git commit cc55bbe6fa7c80778a6e3c14713f596f09f0363d by Martin Gräßlin. Committed on 20/01/2012 at 11:11. Pushed by graesslin into branch 'master'. Add an oxygen styled scrollbar in decoration list Thanks to Nuno for providing the QML based scrollbar. Obviously this does not improve the consistency with other widget styles, so a proper solution is still required. M +2 -1 kwin/kcmkwin/kwindecoration/CMakeLists.txt M +4 -0 kwin/kcmkwin/kwindecoration/kwindecoration.cpp A +147 -0 kwin/kcmkwin/kwindecoration/qml/OxygenScrollbar.qml [License: GPL (v2)] A +- -- kwin/kcmkwin/kwindecoration/qml/images/arrowup.png A +- -- kwin/kcmkwin/kwindecoration/qml/images/arrowupactive.png A +- -- kwin/kcmkwin/kwindecoration/qml/images/bg.png A +- -- kwin/kcmkwin/kwindecoration/qml/images/glow.png A +- -- kwin/kcmkwin/kwindecoration/qml/images/scrool.png A +- -- kwin/kcmkwin/kwindecoration/qml/images/scroolactive.png A +- -- kwin/kcmkwin/kwindecoration/qml/images/shadow.png M +52 -15 kwin/kcmkwin/kwindecoration/qml/main.qml http://commits.kde.org/kde-workspace/cc55bbe6fa7c80778a6e3c14713f596f09f0363d
Git commit 3c982eb55f6b3b8c2f65ad137196c2f6aed9d2ee by Thomas Lübking. Committed on 22/05/2012 at 19:32. Pushed by luebking into branch 'master'. get rid of hardcoded qml ui elements REVIEW: 105018 M +1 -2 kwin/kcmkwin/kwindecoration/CMakeLists.txt M +19 -5 kwin/kcmkwin/kwindecoration/decoration.ui M +47 -4 kwin/kcmkwin/kwindecoration/kwindecoration.cpp M +9 -1 kwin/kcmkwin/kwindecoration/kwindecoration.h D +0 -158 kwin/kcmkwin/kwindecoration/qml/OxygenScrollbar.qml D +- -- kwin/kcmkwin/kwindecoration/qml/images/arrowup.png D +- -- kwin/kcmkwin/kwindecoration/qml/images/arrowupactive.png D +- -- kwin/kcmkwin/kwindecoration/qml/images/bg.png D +- -- kwin/kcmkwin/kwindecoration/qml/images/glow.png D +- -- kwin/kcmkwin/kwindecoration/qml/images/scrool.png D +- -- kwin/kcmkwin/kwindecoration/qml/images/scroolactive.png D +- -- kwin/kcmkwin/kwindecoration/qml/images/shadow.png M +28 -76 kwin/kcmkwin/kwindecoration/qml/main.qml http://commits.kde.org/kde-workspace/3c982eb55f6b3b8c2f65ad137196c2f6aed9d2ee
*** Bug 301366 has been marked as a duplicate of this bug. ***
I would not close this case as the current solution only works with Oxygen style. See the last comment "..., so a proper solution is still required."
comment #10 > comment #9 ;-P