From 36119d3d86666be54e6c7dbe18422fcdaa4f1557 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Wed, 29 May 2019 20:27:09 +0300 Subject: [PATCH] move Indicators published properties,better place --- .../components/IndicatorItem.qml | 26 +++++++++++++++++++ indicators/default/package/ui/main.qml | 2 +- .../org.kde.latte.plasma/package/ui/main.qml | 9 +++---- 3 files changed, 31 insertions(+), 6 deletions(-) diff --git a/declarativeimports/components/IndicatorItem.qml b/declarativeimports/components/IndicatorItem.qml index 0787eb48e..bd1ab4e31 100644 --- a/declarativeimports/components/IndicatorItem.qml +++ b/declarativeimports/components/IndicatorItem.qml @@ -22,4 +22,30 @@ import QtQuick 2.7 Item { readonly property Item level: parent && parent.hasOwnProperty("level") ? parent.level : null readonly property Item indicator: parent && parent.hasOwnProperty("level") ? parent.level.bridge : null + + //! indicator is using main colors from icon e.g. unity style + property bool needsIconColors: false + //! indicator is using the mouse events coordinates e.g. for animations + property bool needsMouseEventCoordinates: false + //! indicator provides also foreground layer that should be drawn on top of the Items icons + property bool providesFrontLayer: false + //! indicator provides its own hovering animations. Latte should not provide + //! any hovering animation in that case + property bool providesHoveredAnimation: false + //! indicator provides its own clicked animations. Latte should not provide + //! any clicked animation in that case + property bool providesClickedAnimation: false + + //! this indicator visuals go out of the regular mask thickness and this variable sets + //! the pixels needed outside of the mask thickness e.g. a glow + property int extraMaskThickness: 0 + + //! this indicator specifies a minimum thickness padding in order to be drawn correctly. + //! Values below the specified value are ignored. This value is a percentage, + //! e.g 0.06 -> 6% + property real minThicknessPadding: 0 + //! this indicator specifies a minimum length padding in order to be drawn correctly. + //! Values below the specified value are ignored. This value is a percentage, + //! e.g 0.06 -> 6% + property real minLengthPadding: 0 } diff --git a/indicators/default/package/ui/main.qml b/indicators/default/package/ui/main.qml index 70160326c..94e4357f0 100644 --- a/indicators/default/package/ui/main.qml +++ b/indicators/default/package/ui/main.qml @@ -30,10 +30,10 @@ import org.kde.latte.components 1.0 as LatteComponents LatteComponents.IndicatorItem{ id: root + extraMaskThickness: reversedEnabled && glowEnabled ? 1.7 * (factor * indicator.maxIconSize) : 0 readonly property real factor: 0.08 readonly property int size: factor * indicator.currentIconSize - readonly property int extraMaskThickness: reversedEnabled && glowEnabled ? 1.7 * (factor * indicator.maxIconSize) : 0 property real textColorBrightness: colorBrightness(theme.textColor) diff --git a/indicators/org.kde.latte.plasma/package/ui/main.qml b/indicators/org.kde.latte.plasma/package/ui/main.qml index 1a8b25982..9ce9abd28 100644 --- a/indicators/org.kde.latte.plasma/package/ui/main.qml +++ b/indicators/org.kde.latte.plasma/package/ui/main.qml @@ -27,11 +27,10 @@ import org.kde.latte.components 1.0 as LatteComponents LatteComponents.IndicatorItem { id: root - //! options published - readonly property bool needsMouseEventCoordinates: true - readonly property bool providesClickedAnimation: clickedAnimationEnabled - readonly property bool providesHoveredAnimation: true - readonly property bool providesFrontLayer: true + needsMouseEventCoordinates: true + providesClickedAnimation: clickedAnimationEnabled + providesHoveredAnimation: true + providesFrontLayer: true //! config options readonly property bool clickedAnimationEnabled: indicator && indicator.configuration