diff --git a/containment/package/contents/ui/VisibilityManager.qml b/containment/package/contents/ui/VisibilityManager.qml index 849efdeb7..ed6b14ff1 100644 --- a/containment/package/contents/ui/VisibilityManager.qml +++ b/containment/package/contents/ui/VisibilityManager.qml @@ -51,22 +51,25 @@ Item{ -thicknessNormal : thicknessNormal; property int thicknessAutoHidden: Latte.WindowSystem.compositingActive ? 2 : 1 - property int thicknessMid: (1 + (0.65 * (root.zoomFactor-1)))*(root.iconSize+root.thickMargins) //needed in some animations - property int thicknessNormal: Math.max(root.iconSize + root.thickMargins +1, + property int thicknessMid: (1 + (0.65 * (root.zoomFactor-1)))*(root.iconSize+root.thickMargins+indicatorsExtraThickMask) //needed in some animations + property int thicknessNormal: Math.max(root.iconSize + root.thickMargins + indicatorsExtraThickMask + 1, root.realPanelSize + root.panelShadow) - property int thicknessZoom: ((root.iconSize+root.thickMargins) * root.zoomFactor) + 2 + property int thicknessZoom: ((root.iconSize+root.thickMargins+indicatorsExtraThickMask) * root.zoomFactor) + 2 //it is used to keep thickness solid e.g. when iconSize changes from auto functions - property int thicknessMidOriginal: Math.max(thicknessNormalOriginal, (1 + (0.65 * (root.zoomFactor-1)))*(root.maxIconSize+root.maxThickMargin)) //needed in some animations + property int thicknessMidOriginal: Math.max(thicknessNormalOriginal,indicatorsExtraThickMask + (1 + (0.65 * (root.zoomFactor-1)))*(root.maxIconSize+root.maxThickMargin)) //needed in some animations property int thicknessNormalOriginal: !root.behaveAsPlasmaPanel || root.editMode ? thicknessNormalOriginalValue : root.realPanelSize + root.panelShadow - property int thicknessNormalOriginalValue: root.maxIconSize + (root.maxThickMargin * 2) + 1 - property int thicknessZoomOriginal: Math.max( ((root.maxIconSize+(root.maxThickMargin * 2)) * root.zoomFactor) + 2, + property int thicknessNormalOriginalValue: root.maxIconSize + (root.maxThickMargin * 2) + indicatorsExtraThickMask + 1 + property int thicknessZoomOriginal: Math.max( ((root.maxIconSize+(root.maxThickMargin * 2)) * root.zoomFactor) + indicatorsExtraThickMask + 2, root.realPanelSize + root.panelShadow, thicknessEditMode) property int thicknessEditMode: thicknessNormalOriginalValue + theme.defaultFont.pixelSize + root.editShadow + //! this is set from indicators when they need extra thickness mask size + property int indicatorsExtraThickMask: 0 + Binding{ target: latteView property:"maxThickness" diff --git a/containment/package/contents/ui/applet/AppletItem.qml b/containment/package/contents/ui/applet/AppletItem.qml index b5d83069e..a21a29691 100644 --- a/containment/package/contents/ui/applet/AppletItem.qml +++ b/containment/package/contents/ui/applet/AppletItem.qml @@ -570,6 +570,22 @@ Item { id:unityStyleIndicator Latte.UnityIndicator{} } + + //! Used when the indicators require more thickness in the view mask + //! e.g. when the Latte indicators are glowing in reverse order + Binding { + target: visibilityManager + property: "indicatorsExtraThickMask" + value: { + if (indicatorLoader.active + && indicatorLoader.item + && indicatorLoader.item.hasOwnProperty("extraMaskThickness")) { + return indicatorLoader.item.extraMaskThickness; + } + + return 0; + } + } } ItemWrapper{ diff --git a/liblatte2/qml/indicators/LatteIndicator.qml b/liblatte2/qml/indicators/LatteIndicator.qml index 8cfa06976..d7cd1a39c 100644 --- a/liblatte2/qml/indicators/LatteIndicator.qml +++ b/liblatte2/qml/indicators/LatteIndicator.qml @@ -33,7 +33,9 @@ import "../code/ColorizerTools.js" as ColorizerTools Item{ id: indicatorRoot - property int size: 0.08 * rootItem.iconSize + readonly property int size: 0.08 * rootItem.iconSize + readonly property int extraMaskThickness: rootItem.reversedEnabled && rootItem.glowEnabled ? 1.7 * size : 0 + readonly property Item rootItem: parent property real textColorBrightness: ColorizerTools.colorBrightness(theme.textColor) @@ -47,8 +49,6 @@ Item{ } property color notActiveColor: rootItem.isMinimized ? minimizedColor : isActiveColor - property Item rootItem: parent - /*Rectangle{ anchors.fill: parent border.width: 1