fixes for ParabolicEffect Ability

pull/15/head
Michail Vourlakos 5 years ago
parent 44c7faba65
commit cfd79ae713

@ -31,19 +31,12 @@ ContainerAbility.ParabolicEffect {
property Item animations: null
property Item appletsRecords: null
property Item view: null
property QtObject view: null
factor.zoom: LatteCore.WindowSystem.compositingActive && animations.active ? ( 1 + (plasmoid.configuration.zoomLevel / 20) ) : 1
factor.maxZoom: Math.max(factor.zoom, appletsRecords.maxInnerZoomFactor)
readonly property bool horizontal: plasmoid.formFactor === PlasmaCore.Types.Horizontal
readonly property bool directRenderingEnabled: _privates.directRenderingEnabled
readonly property int lastIndex: _privates.lastIndex
readonly property Item _privates: Item {
property bool directRenderingEnabled: false
property int lastIndex: -1
}
Connections {
target: parabolic

@ -1579,6 +1579,7 @@ Item {
Ability.ParabolicEffect {
id: _parabolic
animations: _animations
appletsRecords: _appletsRecords
view: latteView
}

@ -27,6 +27,8 @@ AbilityDefinition.ParabolicEffect {
readonly property bool isActive: bridge !== null
factor: ref.parabolic.factor
directRenderingEnabled: ref.parabolic.directRenderingEnabled
lastIndex: local.lastIndex /*special property that needs to remain the same*/
readonly property AbilityDefinition.ParabolicEffect local: AbilityDefinition.ParabolicEffect {}

@ -36,6 +36,12 @@ Item {
host.sglUpdateHigherItemScale(appletIndex+1, newScale, step);
}
/*Be Careful, needs to be considered how to not create
endless recursion because each one calls the other.
If applet in inside a container and as such is using
a parabolic host then the parabolic host clearZoom signal
should be called when needed.
Connections {
target: client ? client : null
onSglClearZoom: {
@ -43,7 +49,7 @@ Item {
parabolicBridge.host.sglClearZoom();
}
}
}
}*/
Connections {
target: host ? host : null

@ -25,6 +25,18 @@ AbilityDefinition.ParabolicEffect {
id: apis
readonly property Item publicApi: Item {
readonly property alias directRenderingEnabled: apis.directRenderingEnabled
readonly property alias factor: apis.factor
readonly property alias lastIndex: apis.lastIndex
signal sglClearZoom();
}
Component.onCompleted: {
apis.sglClearZoom.connect(publicApi.sglClearZoom)
}
Component.onDestruction: {
apis.sglClearZoom.disconnect(publicApi.sglClearZoom)
}
}

@ -24,6 +24,11 @@ import "./paraboliceffect" as ParabolicEffectTypes
Item {
property ParabolicEffectTypes.Factor factor: ParabolicEffectTypes.Factor{}
readonly property bool directRenderingEnabled: _privates.directRenderingEnabled
readonly property int lastIndex: _privates.lastIndex
readonly property ParabolicEffectTypes.PrivateProperties _privates: ParabolicEffectTypes.PrivateProperties {}
signal sglClearZoom();
signal sglUpdateLowerItemScale(int delegateIndex, real newScale, real step);
signal sglUpdateHigherItemScale(int delegateIndex, real newScale, real step);

@ -0,0 +1,25 @@
/*
* Copyright 2020 Michail Vourlakos <mvourlakos@gmail.com>
*
* 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 <http://www.gnu.org/licenses/>.
*/
import QtQuick 2.7
Item {
property bool directRenderingEnabled: false
property int lastIndex: -1
}
Loading…
Cancel
Save