1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-03-21 10:50:30 +03:00

improve criteria for backOnlyOnMaximized case

--animate show/hiding background including its
internal shadows
This commit is contained in:
Michail Vourlakos 2017-05-18 14:56:41 +03:00
parent 49d8b145d2
commit b922b2c7e3
2 changed files with 13 additions and 15 deletions

View File

@ -124,11 +124,21 @@ Item{
imagePath: root.behaveAsPlasmaPanel || !Latte.WindowSystem.compositingActive || !root.panelShadowsActive ? "" : "widgets/panel-background"
prefix: root.behaveAsPlasmaPanel || !Latte.WindowSystem.compositingActive || !root.panelShadowsActive ? "" : "shadow"
opacity: root.useThemePanel ? 1 : 0
visible: (opacity == 0) ? false : true
opacity: {
if (root.forceTransparentPanel || !root.useThemePanel)
return 0;
else
return 1;
}
enabledBorders: dock ? dock.enabledBorders : 0
Behavior on opacity {
NumberAnimation { duration: 8*root.durationTime*units.shortDuration }
}
property int marginsWidth: {
if (imagePath === "") {
return 0;
@ -224,14 +234,7 @@ Item{
anchors.bottomMargin: Latte.WindowSystem.compositingActive ? shadowsSvgItem.margins.bottom - bottomIncreaser : 0
anchors.fill:parent
opacity: {
if (root.backgroundOnlyOnMaximized && !windowsModel.hasMaximizedWindow)
return 0;
else if (root.solidPanel)
return 1;
else
return plasmoid.configuration.panelTransparency / 100;
}
opacity: root.solidPanel ? 1 : plasmoid.configuration.panelTransparency / 100
property rect efGeometry: Qt.rect(-1,-1,0,0)
@ -242,11 +245,6 @@ Item{
Component.onCompleted: root.updateEffectsArea.connect(updateEffectsArea);
Behavior on opacity {
enabled: root.backgroundOnlyOnMaximized
NumberAnimation { duration: 8*root.durationTime*units.shortDuration }
}
Connections{
target: root

View File

@ -121,7 +121,7 @@ DragDrop.DropArea {
property int panelEdgeSpacing: iconSize / 3
property int panelTransparency: plasmoid.configuration.panelTransparency
property bool panelShadowsActive: (plasmoid.configuration.panelShadows && !root.backgroundOnlyOnMaximized)
|| (plasmoid.configuration.panelShadows && root.backgroundOnlyOnMaximized && windowsModel.hasMaximizedWindow)
|| (plasmoid.configuration.panelShadows && root.backgroundOnlyOnMaximized && !root.forceTransparentPanel)
property int totalPanelEdgeSpacing: 0 //this is set by PanelBox
//FIXME: this is not needed any more probably