1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-03-20 06:50:28 +03:00

fix #576,force panel shadow at expanded applets

--there are cases that the panel shadow should be forced
shown even though the user has chosen not to. Such case
is when an applet is expanded and the user has
zoom factor:1, panel background:100%, which is much
similar with a plasma panel configuration
This commit is contained in:
Michail Vourlakos 2017-07-26 02:12:40 +03:00
parent 3f90c61d53
commit 81323df723

View File

@ -73,8 +73,13 @@ DragDrop.DropArea {
property bool disablePanelShadowMaximized: plasmoid.configuration.disablePanelShadowForMaximized
property bool drawShadowsExternal: panelShadowsActive && behaveAsPlasmaPanel
property bool editMode: plasmoid.userConfiguring
property bool forceTransparentPanel: root.backgroundOnlyOnMaximized && !windowsModel.hasMaximizedWindow
&& Latte.WindowSystem.compositingActive
property bool forceTransparentPanel: root.backgroundOnlyOnMaximized && !windowsModel.hasMaximizedWindow && Latte.WindowSystem.compositingActive
&& !(hasExpandedApplet && zoomFactor===1 && plasmoid.configuration.panelSize===100)
readonly property bool hasExpandedApplet: plasmoid.applets.some(function (item) {
return (item.status >= PlasmaCore.Types.NeedsAttentionStatus
&& item.status !== PlasmaCore.Types.HiddenStatus);
})
property bool immutable: plasmoid.immutable
property bool indicateAudioStreams: plasmoid.configuration.indicateAudioStreams
@ -132,9 +137,11 @@ DragDrop.DropArea {
property int panelEdgeSpacing: iconSize / 3
property int panelTransparency: plasmoid.configuration.panelTransparency
property bool panelShadowsActive: ( (plasmoid.configuration.panelShadows && !root.backgroundOnlyOnMaximized)
property bool panelShadowsActive: (( (plasmoid.configuration.panelShadows && !root.backgroundOnlyOnMaximized)
|| (plasmoid.configuration.panelShadows && root.backgroundOnlyOnMaximized && !root.forceTransparentPanel))
&& !(disablePanelShadowMaximized && windowsModel.hasMaximizedWindow)
&& !(disablePanelShadowMaximized && windowsModel.hasMaximizedWindow))
|| (hasExpandedApplet && zoomFactor===1 && plasmoid.configuration.panelSize===100)
property int appShadowOpacity: (plasmoid.configuration.shadowOpacity/100) * 255
property int appShadowSize: (0.4*root.iconSize) * (plasmoid.configuration.shadowSize/100)