From 08863d1116f4d200f69873e879daa11e5c173cf5 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Wed, 25 Dec 2019 22:34:44 +0200 Subject: [PATCH] make Plasma indicator screenEdgeMargin aware --- indicators/org.kde.latte.plasma/package/ui/FrontLayer.qml | 5 +++++ indicators/org.kde.latte.plasma/package/ui/main.qml | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/indicators/org.kde.latte.plasma/package/ui/FrontLayer.qml b/indicators/org.kde.latte.plasma/package/ui/FrontLayer.qml index 5c8bc97c1..b85f78425 100644 --- a/indicators/org.kde.latte.plasma/package/ui/FrontLayer.qml +++ b/indicators/org.kde.latte.plasma/package/ui/FrontLayer.qml @@ -185,6 +185,11 @@ Item { Loader { anchors.fill: parent + anchors.topMargin: plasmoid.location === PlasmaCore.Types.TopEdge ? indicator.screenEdgeMargin : 0 + anchors.bottomMargin: plasmoid.location === PlasmaCore.Types.BottomEdge ? indicator.screenEdgeMargin : 0 + anchors.leftMargin: plasmoid.location === PlasmaCore.Types.LeftEdge ? indicator.screenEdgeMargin : 0 + anchors.rightMargin: plasmoid.location === PlasmaCore.Types.RightEdge ? indicator.screenEdgeMargin : 0 + visible: !indicator.isApplet && indicator.isGroup sourceComponent: Item{ anchors.fill: parent diff --git a/indicators/org.kde.latte.plasma/package/ui/main.qml b/indicators/org.kde.latte.plasma/package/ui/main.qml index e783c21cf..c43e9bb23 100644 --- a/indicators/org.kde.latte.plasma/package/ui/main.qml +++ b/indicators/org.kde.latte.plasma/package/ui/main.qml @@ -47,6 +47,11 @@ LatteComponents.IndicatorItem { Loader{ id: backLayer anchors.fill: parent + anchors.topMargin: plasmoid.location === PlasmaCore.Types.TopEdge ? indicator.screenEdgeMargin : 0 + anchors.bottomMargin: plasmoid.location === PlasmaCore.Types.BottomEdge ? indicator.screenEdgeMargin : 0 + anchors.leftMargin: plasmoid.location === PlasmaCore.Types.LeftEdge ? indicator.screenEdgeMargin : 0 + anchors.rightMargin: plasmoid.location === PlasmaCore.Types.RightEdge ? indicator.screenEdgeMargin : 0 + active: level.isBackground && !indicator.isEmptySpace sourceComponent: BackLayer{} } @@ -54,7 +59,7 @@ LatteComponents.IndicatorItem { /* progress overlay for BackLayer*/ /* it is not added in the BackLayer because the BackLayer is rotated in some cases*/ Loader { - anchors.fill: parent + anchors.fill: backLayer asynchronous: true active: level.isBackground && indicator.progressVisible sourceComponent: Item {