AbstractThumbnailItem inherits from QQuickPaintedItem using QPainter to
do the fallback painting of icons.
The scene is adjusted to get the information from QQuickItem instead of
QDeclarativeItem. Clipping got a little bit more complex as the clip
path does not exist any more. To get it right the ThumbnailItem needs to
specify the parent it wants to be clipped to with the clipTo property.
E.g.:
clipTo: listView
The scene uses this clipTo parent item to correctly calculate the clip
region. Also the ThumbnailItem needs to have clipping enabled.
Note: this commit currently breaks TabBox as the qml and view are not
yet adjusted. In scripting the export of the item is disabled, but any
qml script using a ThumbnailItem would obviously also fail.
In effects it's obvious that compositing is enabled, so specifying the
translucent element is no problem.
In tabbox a context property "compositing" is injected which decides
whether "translucent" or "opaque" elements should be used. Here the
translucent elements are only used if the Blur effect is available - for
this a new Effect::Feature Blur is introduced and in addition it is
tested whether the theme provides the translucent element.
Also the masking is adjusted to ensure that only the shadow is not
blurred.
Reason for this change is that Plasma theme seems not always to pick up
whether compositing is used when used from inside KWin. It does not cover
the Desktop Change OSD which uses PlasmaCore.Dialog and there we cannot
(yet) inject that we use compositing.
Overall I'm quite unhappy with this patch and I do hope we can fix it in
the proper place in the lifetime of 4.10 and revert this patch.
CCBUG: 311995
REVIEW: 108438
due to plasma change, shadow is not included by default, hence kwin
tabbox need to handle shadow by itself, and due to kwin is compositor
and have shadow as effects, it's not a good idea to use X property to
pass shadow from kwin to X and to kwin. This change use the old way to
draw shadow side the tabbox, and partly move the blur region setting to
qml.
REVIEW: 108243
Flicking has to stop at the bounds in the window switcher
layouts. It's not natural on the desktop that they are
flickable in the first place.
Window Strip is unchanged as this layout is intended to be used
on touch and flickable user experiences.
REVIEW: 105001
The grabbed key events inside TabBox are forwarded to the declarative
view which passes it to the normal keyPressedEvent() method. This
allows the QML files to handle keyboard navigation themselves.
The views support key navigation natively, though this cannot be
used as we need to update the ModelIndex when a new item is selected.
Also there seems to be a problem if the tabbox is shown again, in
that case the focus seems to be somehow lost. Because of that the
navigation is handled in the Item embedding the list.
REVIEW: 104357
FEATURE: 291916
FIXED-IN: 4.9.0
This layout is intended to replace the TabBox mode in Present
Windows effect.
The advantages of a layout over the effect are:
* works without compositing
* supports multi-screen in a better way (windows don't move)
* is an overlay on top of the windows instead of reusing the windows
* is not a hack inside the actual effect
* visually consistent with other layouts