Bug 291612

Summary: inconsistent scrollbar in decoration kcm
Product: [Plasma] kwin Reporter: Hugo Pereira Da Costa <hugo.pereira.da.costa>
Component: decorationsAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: cfeck, hugo.pereira.da.costa, kollix
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: scrollbar

Description Hugo Pereira Da Costa 2012-01-15 21:13:01 UTC
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.
Comment 1 Martin Flöser 2012-01-15 21:39:12 UTC
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.
Comment 2 Thomas Lübking 2012-01-15 21:43:22 UTC
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 :-(
Comment 3 Martin Flöser 2012-01-15 21:52:35 UTC
> 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.
Comment 4 Hugo Pereira Da Costa 2012-01-16 08:27:18 UTC
@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 ...
Comment 5 Christoph Feck 2012-01-16 14:49:45 UTC
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?
Comment 6 Martin Flöser 2012-01-16 16:35:59 UTC
> 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).
Comment 7 Thomas Lübking 2012-01-16 16:50:36 UTC
(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.
Comment 8 Martin Flöser 2012-01-16 17:15:30 UTC
> > 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
Comment 9 Martin Flöser 2012-01-20 10:13:36 UTC
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
Comment 10 Thomas Lübking 2012-06-07 11:00:07 UTC
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
Comment 11 Christoph Feck 2012-06-07 14:56:22 UTC
*** Bug 301366 has been marked as a duplicate of this bug. ***
Comment 12 Martin Koller 2012-06-07 15:13:44 UTC
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 13 Thomas Lübking 2012-06-07 15:26:19 UTC
comment #10 > comment #9 ;-P