mirror of
https://github.com/KDE/latte-dock.git
synced 2024-12-26 11:21:40 +03:00
increase mask thickness when indicators needed it
This commit is contained in:
parent
35c9550963
commit
dd1c3f61b8
@ -51,22 +51,25 @@ Item{
|
|||||||
-thicknessNormal : thicknessNormal;
|
-thicknessNormal : thicknessNormal;
|
||||||
|
|
||||||
property int thicknessAutoHidden: Latte.WindowSystem.compositingActive ? 2 : 1
|
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 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 +1,
|
property int thicknessNormal: Math.max(root.iconSize + root.thickMargins + indicatorsExtraThickMask + 1,
|
||||||
root.realPanelSize + root.panelShadow)
|
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
|
//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 ?
|
property int thicknessNormalOriginal: !root.behaveAsPlasmaPanel || root.editMode ?
|
||||||
thicknessNormalOriginalValue : root.realPanelSize + root.panelShadow
|
thicknessNormalOriginalValue : root.realPanelSize + root.panelShadow
|
||||||
|
|
||||||
property int thicknessNormalOriginalValue: root.maxIconSize + (root.maxThickMargin * 2) + 1
|
property int thicknessNormalOriginalValue: root.maxIconSize + (root.maxThickMargin * 2) + indicatorsExtraThickMask + 1
|
||||||
property int thicknessZoomOriginal: Math.max( ((root.maxIconSize+(root.maxThickMargin * 2)) * root.zoomFactor) + 2,
|
property int thicknessZoomOriginal: Math.max( ((root.maxIconSize+(root.maxThickMargin * 2)) * root.zoomFactor) + indicatorsExtraThickMask + 2,
|
||||||
root.realPanelSize + root.panelShadow,
|
root.realPanelSize + root.panelShadow,
|
||||||
thicknessEditMode)
|
thicknessEditMode)
|
||||||
|
|
||||||
property int thicknessEditMode: thicknessNormalOriginalValue + theme.defaultFont.pixelSize + root.editShadow
|
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{
|
Binding{
|
||||||
target: latteView
|
target: latteView
|
||||||
property:"maxThickness"
|
property:"maxThickness"
|
||||||
|
@ -570,6 +570,22 @@ Item {
|
|||||||
id:unityStyleIndicator
|
id:unityStyleIndicator
|
||||||
Latte.UnityIndicator{}
|
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{
|
ItemWrapper{
|
||||||
|
@ -33,7 +33,9 @@ import "../code/ColorizerTools.js" as ColorizerTools
|
|||||||
Item{
|
Item{
|
||||||
id: indicatorRoot
|
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)
|
property real textColorBrightness: ColorizerTools.colorBrightness(theme.textColor)
|
||||||
|
|
||||||
@ -47,8 +49,6 @@ Item{
|
|||||||
}
|
}
|
||||||
property color notActiveColor: rootItem.isMinimized ? minimizedColor : isActiveColor
|
property color notActiveColor: rootItem.isMinimized ? minimizedColor : isActiveColor
|
||||||
|
|
||||||
property Item rootItem: parent
|
|
||||||
|
|
||||||
/*Rectangle{
|
/*Rectangle{
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
border.width: 1
|
border.width: 1
|
||||||
|
Loading…
Reference in New Issue
Block a user