[Panel Containment] Fix re-arranging applets in right-to-left mode

Authored by broulik on Aug 23 2016, 11:33 AM.

Description

[Panel Containment] Fix re-arranging applets in right-to-left mode

While dragging a widget, it is reparented to "root" so it can be moved freely without
the other applets reacting on that. However, in right-to-left mode, since the toolbox is
on the left side, the coordinate system of the applet parented to "root" did not match
the applets in "currentLayout".

This happened to work in left-to-right as there "currentLayout" was at coordinates 0,0.
Instead of manually fiddling the margins into the positioning, just reparent the applet
to another Item which is anchors.fill'd to the layout (and thus has its margins)
and let QML figure it out.

Moreover, mirror the flyout that shows the applet name and config/delete buttons.

Differential Revision: https://phabricator.kde.org/D2532

Details