From 87f29197bd0086ac1b8e54ee6fc8053c0f451a80 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Fri, 1 Jan 2021 12:49:43 +0200 Subject: [PATCH] expose new properties to applets -paddingThickness -marginLength -paddingLength --are now provided through LatteBridge to applets --- .../contents/ui/applet/ItemWrapper.qml | 2 +- .../ui/applet/communicator/LatteBridge.qml | 24 +++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/containment/package/contents/ui/applet/ItemWrapper.qml b/containment/package/contents/ui/applet/ItemWrapper.qml index c2392599a..d361f578e 100644 --- a/containment/package/contents/ui/applet/ItemWrapper.qml +++ b/containment/package/contents/ui/applet/ItemWrapper.qml @@ -356,7 +356,7 @@ Item{ return wrapper.layoutThickness; } - var wrapperContainerThickness = wrapper.zoomScaleThickness * (metrics.iconSize/* appletItem.metrics.totals.thickness*/); + var wrapperContainerThickness = appletItem.screenEdgeMarginSupported ? appletItem.metrics.totals.thickness : wrapper.zoomScaleThickness * metrics.iconSize; return appletItem.screenEdgeMarginSupported ? wrapperContainerThickness + appletItem.metrics.margin.screenEdge : wrapperContainerThickness; } } diff --git a/containment/package/contents/ui/applet/communicator/LatteBridge.qml b/containment/package/contents/ui/applet/communicator/LatteBridge.qml index 0e4caa087..3fa637715 100644 --- a/containment/package/contents/ui/applet/communicator/LatteBridge.qml +++ b/containment/package/contents/ui/applet/communicator/LatteBridge.qml @@ -98,6 +98,30 @@ Item{ // @since: 0.10 readonly property int screenEdgeMargin: appletItem.metrics.margin.screenEdge + // NAME: thicknessPadding + // USAGE: read-only + // EXPLANATION: The thickness padding around applet in pixels + // USE CASE: it can be used from applets that want to be informed what is the thickness padding + // currently applied + // @since: 0.10 + readonly property int thicknessPadding: appletItem.metrics.margin.thickness + + // NAME: lengthMargin + // USAGE: read-only + // EXPLANATION: The length margin around applet in pixels + // USE CASE: it can be used from applets that want to be informed what is the length margin + // currently applied + // @since: 0.10 + readonly property int lengthMargin: appletItem.metrics.margin.length + + // NAME: lengthPadding + // USAGE: read-only + // EXPLANATION: The length padding around applet in pixels + // USE CASE: it can be used from applets that want to be informed what is the length padding + // currently applied + // @since: 0.10 + readonly property int lengthPadding: appletItem.lengthAppletPadding + // NAME: maxZoomFactor // USAGE: read-only // EXPLANATION: The maximum zoom factor currently used