It's basically a run of the port-cmake.sh script in here, mostly the changes
are the following:
- Using KF5::* targets
- Using the proper macros, following recent developments in frameworks
All the rendering to QPixmap code in the Model and the Preview is
deleted as it's no longer used.
The model still has the plugin for the border size functionality.
This probably needs a change in the API to make it completely bound
to the decoration and not a global thing.
Using a QQuickPaintedItem for the rendering. The item gets the library
name from the model and loads the decoration with its own decoration
plugin. Thus each preview has its own plugin which eliminates the need to
constantly recreate the decoration as it is done with the preview.
Having a QQuickItem gives new possibilities. The item accepts hover
events and forwards them as enter and leave events to the widgets inside
the decoration. By that the mouse interaction of e.g. Oxygen is still
functional. If the decoration uses the new update approach the bridge is
forwarding the updates to the item and triggering a repaint so we even
have animations in the preview although the widget is never shown.
The PaintRedirector calls the new method KDecoration::render and passes
it's PaintDevice and the region to update to it. A decoration can
implement this method and provide an optimized implementation for the
painting which does not go through the deco's QWidget at all. In addition
the decoration can invoke an update() slot which will schedule a repaint
in the PaintRedirector and thus completely replaces the need for
intercepting paint events on the QWidget and also allows to add QWindow
based decorations in future.
- B2 linked to the wrong slot (instead of changed signal)
- border size change was not written (for B2, Laptop etc)
- Aurorae didn't recreate decos when required
BUG: 325946
FIXED-IN: 4.11.3
REVIEW: 113229
This introduces quite some changes. We cannot include a QQuickView
directly in the QWidget based UI as a replacement for the
QDeclarativeView used before.
Instead a QScrollArea is used as replacement for the view and a
QQuickView is embedded into a widget container in the scroll area's
view port. This allows us to keep the existing semantic of having a
native scroll bar synced with the list view. It might be an idea to
change this to QtQuickControls in future.
As the list view is now only inside the scroll area we do not need to
pass the slider width to the root context and can by that more easily
calculate the width of one decoration.
Reset on the factory cannot be invoked directly anymore. The factory
connects to change signals and emits a signal in case the decorations
need to be re-created. So we need to connect to this signal whenever
we expect that a change might trigger a recreation.