This was missing from what is available in KWin core. The brightness and
saturation are implemented using a custom shader which uses the same
logic as what we use in the scene shader.
We are only rendering an image, so it's better to load the image into a
texture. This allows to properly scale the example preview which
magically fixes all the layouting problems which used to be there.
A new QML item "ThumbnailItem" is registered to the TabBox. The
C++ implementation finds the EffectWindow of the TabBox and adds
itself to the EffectWindow.
While rendering the EffectWindow the information for all registered
ThumbnailItems are extracted and the thumbnail is rendered on top
of the EffectWindow.
This has obvious limitations like you cannot put other QML items
on top of the thumbnail. Nevertheless it works well enough to
be a possible replacement for e.g. BoxSwitch effect.
When compositing is disabled an icon is rendered instead of the
Thumbnail.
One TabBox Layout inspired by BoxSwitch Effect is added. For the
KCM small pre-rendered items are used.
REVIEW: 103039