From cf71eac686780684a0f53c6b452be257abe8e64a Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Tue, 14 Mar 2017 00:15:45 +0200 Subject: [PATCH] update panel alignment correctly --when the dock was changing between form factors the edge alignments must be tranlated correctly. e.g. left and right must become top and bottom accordingly --- containment/contents/ui/main.qml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/containment/contents/ui/main.qml b/containment/contents/ui/main.qml index 09c382def..a7741a43a 100644 --- a/containment/contents/ui/main.qml +++ b/containment/contents/ui/main.qml @@ -537,6 +537,20 @@ DragDrop.DropArea { } } + onIsVerticalChanged: { + if (isVertical) { + if (plasmoid.configuration.panelPosition === Latte.Dock.Left) + plasmoid.configuration.panelPosition = Latte.Dock.Top; + else if (plasmoid.configuration.panelPosition === Latte.Dock.Right) + plasmoid.configuration.panelPosition = Latte.Dock.Bottom; + } else { + if (plasmoid.configuration.panelPosition === Latte.Dock.Top) + plasmoid.configuration.panelPosition = Latte.Dock.Left; + else if (plasmoid.configuration.panelPosition === Latte.Dock.Bottom) + plasmoid.configuration.panelPosition = Latte.Dock.Right; + } + } + onProportionIconSizeChanged: { if (proportionIconSize!==-1) updateAutomaticIconSize();