From 51a1a1af5a8f79ac242ff761f547093ff7f7b196 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Sun, 15 Oct 2017 10:17:21 +0300 Subject: [PATCH] improve margins for internal separator case --enable task margins for neighbour separator when the internal separator is hidden but there is an applet separator at the edges and the task is found two steps far from the edge e.g. pos=1 or pos=tasksCount-2 --- plasmoid/package/contents/ui/task/TaskDelegate.qml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plasmoid/package/contents/ui/task/TaskDelegate.qml b/plasmoid/package/contents/ui/task/TaskDelegate.qml index d025b8f5f..6fb75dacc 100644 --- a/plasmoid/package/contents/ui/task/TaskDelegate.qml +++ b/plasmoid/package/contents/ui/task/TaskDelegate.qml @@ -313,13 +313,15 @@ MouseArea{ function updateNeighbour() { //index===-1 indicates that this item is removed if (latteDock && index!==-1) { - hiddenSpacerLeft.neighbourSeparator = latteDock.parabolicManager.isSeparator(latteDock.latteAppletPos-1) && indexUsed===0; + hiddenSpacerLeft.neighbourSeparator = latteDock.parabolicManager.isSeparator(latteDock.latteAppletPos-1) + && (indexUsed===0 || (indexUsed===1 && root.internalSeparatorPos===0 && root.internalSeparatorHidden)); } } Connections{ target: root onLatteDockChanged: hiddenSpacerLeft.updateNeighbour(); + onInternalSeparatorHiddenChanged: hiddenSpacerLeft.updateNeighbour(); } Connections{ @@ -389,13 +391,17 @@ MouseArea{ function updateNeighbour() { //index===-1 indicates that this item is removed if (latteDock && index!==-1) { - hiddenSpacerRight.neighbourSeparator = latteDock.parabolicManager.isSeparator(latteDock.latteAppletPos+1) && indexUsed===root.tasksCount-1; + hiddenSpacerRight.neighbourSeparator = latteDock.parabolicManager.isSeparator(latteDock.latteAppletPos+1) + && ( indexUsed===root.tasksCount-1 || (indexUsed===root.tasksCount-2 && indexUsed>=0 + && root.internalSeparatorPos===root.tasksCount-1 + && root.internalSeparatorHidden));; } } Connections{ target: root onLatteDockChanged: hiddenSpacerRight.updateNeighbour(); + onInternalSeparatorHiddenChanged: hiddenSpacerRight.updateNeighbour(); } Connections{