From 79db299a7f197f5c5b74da75b5cc66aa014625c0 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Sun, 21 May 2017 14:08:29 +0300 Subject: [PATCH] fix positioning of internal separator --- .../package/contents/ui/task/TaskDelegate.qml | 49 ++++++++++++++----- .../package/contents/ui/task/TaskIconItem.qml | 37 -------------- 2 files changed, 38 insertions(+), 48 deletions(-) diff --git a/plasmoid/package/contents/ui/task/TaskDelegate.qml b/plasmoid/package/contents/ui/task/TaskDelegate.qml index 19112a63e..f3d8a1fc5 100644 --- a/plasmoid/package/contents/ui/task/TaskDelegate.qml +++ b/plasmoid/package/contents/ui/task/TaskDelegate.qml @@ -171,14 +171,6 @@ MouseArea{ signal groupWindowRemoved(); signal checkWindowsStates(); - /* Rectangle{ - anchors.fill: parent - border.width: 1 - border.color: "blue" - color: "transparent" - // visible: IsStartup ? true : false - } */ - Behavior on opacity { // NumberAnimation { duration: (IsStartup || (IsLauncher) ) ? 0 : 400 } NumberAnimation { duration: root.durationTime*units.longDuration } @@ -208,6 +200,41 @@ MouseArea{ } } + Item{ + id:separatorItem + anchors.rightMargin: root.position === PlasmaCore.Types.RightPositioned ? localThickMargin : 0 + anchors.leftMargin: root.position === PlasmaCore.Types.LeftPositioned ? localThickMargin : 0 + anchors.bottomMargin: root.position === PlasmaCore.Types.BottomPositioned ? localThickMargin : 0 + anchors.topMargin: root.position === PlasmaCore.Types.TopPositioned ? localThickMargin : 0 + + anchors.horizontalCenter: !root.vertical ? parent.horizontalCenter : undefined + anchors.verticalCenter: root.vertical ? parent.verticalCenter : undefined + anchors.right: root.position === PlasmaCore.Types.RightPositioned ? parent.right : undefined; + anchors.left: root.position === PlasmaCore.Types.LeftPositioned ? parent.left : undefined; + anchors.top: root.position === PlasmaCore.Types.TopPositioned ? parent.top : undefined; + anchors.bottom: root.position === PlasmaCore.Types.BottomPositioned ? parent.bottom : undefined; + + opacity: 0.5 + visible: mainItemContainer.isSeparator + + width: root.vertical ? root.iconSize : 1 + height: !root.vertical ? root.iconSize : 1 + + property int localThickMargin: root.thickMarginBase + 4 + + Rectangle { + anchors.horizontalCenter: !root.vertical ? parent.horizontalCenter : undefined + anchors.verticalCenter: root.vertical ? parent.verticalCenter : undefined + anchors.right: root.position === PlasmaCore.Types.RightPositioned ? parent.right : undefined; + anchors.left: root.position === PlasmaCore.Types.LeftPositioned ? parent.left : undefined; + anchors.top: root.position === PlasmaCore.Types.TopPositioned ? parent.top : undefined; + anchors.bottom: root.position === PlasmaCore.Types.BottomPositioned ? parent.bottom : undefined; + + width: root.vertical ? root.iconSize - 8 : 1 + height: !root.vertical ? root.iconSize - 8 : 1 + color: theme.textColor + } + } Flow{ id: taskFlow @@ -241,7 +268,7 @@ MouseArea{ NumberAnimation { duration: root.directRenderAnimationTime } } - /* Rectangle{ + /*Rectangle{ width: !root.vertical ? parent.width : 1 height: !root.vertical ? 1 : parent.height x: root.vertical ? parent.width /2 : 0 @@ -280,7 +307,7 @@ MouseArea{ NumberAnimation { duration: root.directRenderAnimationTime } } - /* Rectangle{ + /*Rectangle{ width: !root.vertical ? parent.width : 1 height: !root.vertical ? 1 : parent.height x: root.vertical ? parent.width /2 : 0 @@ -288,7 +315,7 @@ MouseArea{ border.width: 1 border.color: "red" color: "transparent" - } */ + }*/ } }// Flow with hidden spacers inside diff --git a/plasmoid/package/contents/ui/task/TaskIconItem.qml b/plasmoid/package/contents/ui/task/TaskIconItem.qml index 7ed48d9e3..4462f1084 100644 --- a/plasmoid/package/contents/ui/task/TaskIconItem.qml +++ b/plasmoid/package/contents/ui/task/TaskIconItem.qml @@ -120,43 +120,6 @@ Item{ width: parent.width height: parent.height - Item{ - id:separatorItem - anchors.rightMargin: root.position === PlasmaCore.Types.RightPositioned ? localThickMargin : 0 - anchors.leftMargin: root.position === PlasmaCore.Types.LeftPositioned ? localThickMargin : 0 - anchors.bottomMargin: root.position === PlasmaCore.Types.BottomPositioned ? localThickMargin : 0 - anchors.topMargin: root.position === PlasmaCore.Types.TopPositioned ? localThickMargin : 0 - - anchors.horizontalCenter: !root.vertical ? parent.horizontalCenter : undefined - anchors.verticalCenter: root.vertical ? parent.verticalCenter : undefined - anchors.right: root.position === PlasmaCore.Types.RightPositioned ? parent.right : undefined; - anchors.left: root.position === PlasmaCore.Types.LeftPositioned ? parent.left : undefined; - anchors.top: root.position === PlasmaCore.Types.TopPositioned ? parent.top : undefined; - anchors.bottom: root.position === PlasmaCore.Types.BottomPositioned ? parent.bottom : undefined; - - opacity: 0.5 - visible: mainItemContainer.isSeparator - - width: root.vertical ? root.iconSize : 1 - height: !root.vertical ? root.iconSize : 1 - - property int localThickMargin: root.thickMarginBase + 4 - - Rectangle { - anchors.horizontalCenter: !root.vertical ? parent.horizontalCenter : undefined - anchors.verticalCenter: root.vertical ? parent.verticalCenter : undefined - anchors.right: root.position === PlasmaCore.Types.RightPositioned ? parent.right : undefined; - anchors.left: root.position === PlasmaCore.Types.LeftPositioned ? parent.left : undefined; - anchors.top: root.position === PlasmaCore.Types.TopPositioned ? parent.top : undefined; - anchors.bottom: root.position === PlasmaCore.Types.BottomPositioned ? parent.bottom : undefined; - - width: root.vertical ? root.iconSize - 8 : 1 - height: !root.vertical ? root.iconSize - 8 : 1 - color: theme.textColor - } - } - - Latte.IconItem{ id: iconImageBuffer