diff --git a/containment/package/contents/ui/abilities/ParabolicEffect.qml b/containment/package/contents/ui/abilities/ParabolicEffect.qml index 3ae2f7ec9..f850e8c3d 100644 --- a/containment/package/contents/ui/abilities/ParabolicEffect.qml +++ b/containment/package/contents/ui/abilities/ParabolicEffect.qml @@ -29,5 +29,5 @@ import "./privates" as Ability Ability.ParabolicEffectPrivate { factor.zoom: LatteCore.WindowSystem.compositingActive && animations.active ? ( 1 + (plasmoid.configuration.zoomLevel / 20) ) : 1 factor.maxZoom: Math.max(factor.zoom, appletsRecords.maxInnerZoomFactor) - restoreZoomIsBlocked: view && view.contextMenuIsShown + restoreZoomIsBlocked: (view && view.contextMenuIsShown) || (layouts.ability.parabolic.restoreZoomIsBlocked) } diff --git a/containment/package/contents/ui/abilities/privates/ParabolicEffectPrivate.qml b/containment/package/contents/ui/abilities/privates/ParabolicEffectPrivate.qml index 40102647d..c4b434835 100644 --- a/containment/package/contents/ui/abilities/privates/ParabolicEffectPrivate.qml +++ b/containment/package/contents/ui/abilities/privates/ParabolicEffectPrivate.qml @@ -31,6 +31,7 @@ ContainerAbility.ParabolicEffect { property Item animations: null property Item appletsRecords: null + property Item layouts: null property QtObject view: null readonly property bool horizontal: plasmoid.formFactor === PlasmaCore.Types.Horizontal @@ -52,11 +53,6 @@ ContainerAbility.ParabolicEffect { ignoreUnknownSignals : true onContainsMouseChanged: { if (!parabolic.view.visibility.containsMouse && !restoreZoomTimer.running) { - //! applets context menus is a good example that restoreZoomIsBlocked of host should track down - //! all clients restoreZoomIsBlocked properties ?? - //! OR it must be tracked down why in multi-clients environment releasing - //! parabolic effect is not applied when the user rapid moves the mouse - //! between multiple parabolic clients/applets parabolic.startRestoreZoomTimer() } } diff --git a/containment/package/contents/ui/layouts/AppletsContainer.qml b/containment/package/contents/ui/layouts/AppletsContainer.qml index de460004d..aebde6a33 100644 --- a/containment/package/contents/ui/layouts/AppletsContainer.qml +++ b/containment/package/contents/ui/layouts/AppletsContainer.qml @@ -23,7 +23,9 @@ import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.latte.core 0.2 as LatteCore -Grid { +import "./abilities" as Abilities + +Abilities.AbilityGrid { id: appletsContainer columns: root.isVertical ? 1 : 0 diff --git a/containment/package/contents/ui/layouts/LayoutsContainer.qml b/containment/package/contents/ui/layouts/LayoutsContainer.qml index 0dd24a16f..9497e5e39 100644 --- a/containment/package/contents/ui/layouts/LayoutsContainer.qml +++ b/containment/package/contents/ui/layouts/LayoutsContainer.qml @@ -28,6 +28,7 @@ import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.latte.core 0.2 as LatteCore import org.kde.latte.private.containment 0.1 as LatteContainment +import "./abilities" as AbilitiesTypes import "../../code/HeuristicTools.js" as HeuristicTools Item{ @@ -43,9 +44,15 @@ Item{ readonly property int fillApplets: _startLayout.fillApplets + _mainLayout.fillApplets + _endLayout.fillApplets - property Item startLayout : _startLayout - property Item mainLayout: _mainLayout - property Item endLayout: _endLayout + readonly property alias startLayout : _startLayout + readonly property alias mainLayout: _mainLayout + readonly property alias endLayout: _endLayout + + readonly property AbilitiesTypes.AbilityLayouts ability: AbilitiesTypes.AbilityLayouts{ + startLayout: _startLayout + mainLayout: _mainLayout + endLayout: _endLayout + } Binding { target: layoutsContainer diff --git a/containment/package/contents/ui/layouts/abilities/AbilityGrid.qml b/containment/package/contents/ui/layouts/abilities/AbilityGrid.qml new file mode 100644 index 000000000..bb2ce6a0c --- /dev/null +++ b/containment/package/contents/ui/layouts/abilities/AbilityGrid.qml @@ -0,0 +1,41 @@ +/* +* Copyright 2020 Michail Vourlakos +* +* This file is part of Latte-Dock +* +* Latte-Dock is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* Latte-Dock is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ + +import QtQuick 2.7 + +import org.kde.plasma.core 2.0 as PlasmaCore + +AbilityGridPrivate { + id: grid + + ability.parabolic.restoreZoomIsBlocked: { + var cnts = 0; + + for (var i=0; i +* +* This file is part of Latte-Dock +* +* Latte-Dock is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* Latte-Dock is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ + +import QtQuick 2.7 + +import org.kde.plasma.core 2.0 as PlasmaCore + +import "./types" as AbilityTypes + +Grid { + readonly property AbilityTypes.AbilitiesHost ability: AbilityTypes.AbilitiesHost{} +} diff --git a/containment/package/contents/ui/layouts/abilities/AbilityLayouts.qml b/containment/package/contents/ui/layouts/abilities/AbilityLayouts.qml new file mode 100644 index 000000000..ab44648a3 --- /dev/null +++ b/containment/package/contents/ui/layouts/abilities/AbilityLayouts.qml @@ -0,0 +1,26 @@ +/* +* Copyright 2020 Michail Vourlakos +* +* This file is part of Latte-Dock +* +* Latte-Dock is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* Latte-Dock is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ + +import QtQuick 2.7 + +AbilityLayoutsPrivate { + parabolic.restoreZoomIsBlocked: startLayout.ability.parabolic.restoreZoomIsBlocked + || mainLayout.ability.parabolic.restoreZoomIsBlocked + || endLayout.ability.parabolic.restoreZoomIsBlocked +} diff --git a/containment/package/contents/ui/layouts/abilities/AbilityLayoutsPrivate.qml b/containment/package/contents/ui/layouts/abilities/AbilityLayoutsPrivate.qml new file mode 100644 index 000000000..e01f83db0 --- /dev/null +++ b/containment/package/contents/ui/layouts/abilities/AbilityLayoutsPrivate.qml @@ -0,0 +1,32 @@ +/* +* Copyright 2020 Michail Vourlakos +* +* This file is part of Latte-Dock +* +* Latte-Dock is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* Latte-Dock is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ + +import QtQuick 2.7 + +import org.kde.plasma.core 2.0 as PlasmaCore + +import "./types" as AbilityTypes + +Item { + property Item startLayout: null + property Item mainLayout: null + property Item endLayout: null + + readonly property AbilityTypes.ParabolicEffect parabolic: AbilityTypes.ParabolicEffect{} +} diff --git a/containment/package/contents/ui/layouts/abilities/types/AbilitiesHost.qml b/containment/package/contents/ui/layouts/abilities/types/AbilitiesHost.qml new file mode 100644 index 000000000..b1898ab1e --- /dev/null +++ b/containment/package/contents/ui/layouts/abilities/types/AbilitiesHost.qml @@ -0,0 +1,24 @@ +/* +* Copyright 2020 Michail Vourlakos +* +* This file is part of Latte-Dock +* +* Latte-Dock is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* Latte-Dock is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ + +import QtQuick 2.7 + +Item { + readonly property ParabolicEffect parabolic: ParabolicEffect{} +} diff --git a/containment/package/contents/ui/layouts/abilities/types/ParabolicEffect.qml b/containment/package/contents/ui/layouts/abilities/types/ParabolicEffect.qml new file mode 100644 index 000000000..bcb7bebe0 --- /dev/null +++ b/containment/package/contents/ui/layouts/abilities/types/ParabolicEffect.qml @@ -0,0 +1,25 @@ +/* +* Copyright 2020 Michail Vourlakos +* +* This file is part of Latte-Dock +* +* Latte-Dock is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* Latte-Dock is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ + +import QtQuick 2.7 + +Item { + property bool restoreZoomIsBlocked: false + property int lastIndex: -1 +} diff --git a/containment/package/contents/ui/main.qml b/containment/package/contents/ui/main.qml index 6e57af70e..32c06044f 100644 --- a/containment/package/contents/ui/main.qml +++ b/containment/package/contents/ui/main.qml @@ -1580,6 +1580,7 @@ Item { id: _parabolic animations: _animations appletsRecords: _appletsRecords + layouts: layoutsContainer view: latteView }