mirror of
https://github.com/KDE/latte-dock.git
synced 2025-02-10 09:57:35 +03:00
drop LayoutsContainer.restoreZoomIsBlocked
--Parabolic Host Ability is quite capable to handle this properly
This commit is contained in:
parent
56cf1535d2
commit
0e002567dc
@ -30,8 +30,7 @@ Ability.ParabolicEffectPrivate {
|
||||
isEnabled: factor.zoom>1 && !root.inConfigureAppletsMode
|
||||
factor.zoom: LatteCore.WindowSystem.compositingActive && animations.active ? ( 1 + (plasmoid.configuration.zoomLevel / 20) ) : 1
|
||||
factor.maxZoom: Math.max(factor.zoom, animations.requirements.zoomFactor)
|
||||
restoreZoomIsBlocked: (view && view.contextMenuIsShown)
|
||||
|| (applets.parabolic.restoreZoomIsBlocked)
|
||||
restoreZoomIsBlocked: restoreZoomIsBlockedFromApplet || (view && view.contextMenuIsShown)
|
||||
|
||||
currentParabolicItem: view ? view.parabolic.currentItem : null
|
||||
}
|
||||
|
@ -30,12 +30,13 @@ AbilityHost.ParabolicEffect {
|
||||
id: parabolic
|
||||
|
||||
property Item animations: null
|
||||
property Item applets: null
|
||||
property Item debug: null
|
||||
property Item layouts: null
|
||||
property QtObject view: null
|
||||
|
||||
readonly property bool horizontal: plasmoid.formFactor === PlasmaCore.Types.Horizontal
|
||||
|
||||
property bool restoreZoomIsBlockedFromApplet: false
|
||||
property int lastParabolicItemIndex: -1
|
||||
|
||||
Connections {
|
||||
@ -78,6 +79,40 @@ AbilityHost.ParabolicEffect {
|
||||
}
|
||||
}
|
||||
|
||||
//! do not update during dragging/moving applets inConfigureAppletsMode
|
||||
readonly property bool isBindingUpdateEnabled: !(root.dragOverlay && root.dragOverlay.pressed)
|
||||
|
||||
Binding{
|
||||
target: parabolic
|
||||
property: "restoreZoomIsBlockedFromApplet"
|
||||
when: isBindingUpdateEnabled
|
||||
value: {
|
||||
var grid;
|
||||
|
||||
for (var l=0; l<=2; ++l) {
|
||||
if (l===0) {
|
||||
grid = layouts.startLayout;
|
||||
} else if (l===1) {
|
||||
grid = layouts.mainLayout;
|
||||
} else if (l===2) {
|
||||
grid = layouts.endLayout;
|
||||
}
|
||||
|
||||
for (var i=0; i<grid.children.length; ++i){
|
||||
var appletItem = grid.children[i];
|
||||
if (appletItem
|
||||
&& appletItem.communicator
|
||||
&& appletItem.communicator.parabolicEffectIsSupported
|
||||
&& appletItem.communicator.bridge.parabolic.client.local.restoreZoomIsBlocked) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function startRestoreZoomTimer(){
|
||||
if (restoreZoomIsBlocked) {
|
||||
return;
|
||||
|
@ -27,25 +27,6 @@ AbilityGridPrivate {
|
||||
//! do not update during dragging/moving applets inConfigureAppletsMode
|
||||
readonly property bool updateIsBlocked: root.dragOverlay && root.dragOverlay.pressed
|
||||
|
||||
Binding{
|
||||
target: ability.parabolic
|
||||
property: "restoreZoomIsBlocked"
|
||||
when: !updateIsBlocked
|
||||
value: {
|
||||
for (var i=0; i<grid.children.length; ++i){
|
||||
var appletItem = grid.children[i];
|
||||
if (appletItem
|
||||
&& appletItem.communicator
|
||||
&& appletItem.communicator.parabolicEffectIsSupported
|
||||
&& appletItem.communicator.bridge.parabolic.client.local.restoreZoomIsBlocked) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Binding{
|
||||
target: ability.require
|
||||
property: "windowsTrackingCount"
|
||||
|
@ -20,10 +20,6 @@
|
||||
import QtQuick 2.7
|
||||
|
||||
AbilityLayoutsPrivate {
|
||||
parabolic.restoreZoomIsBlocked: startLayout.ability.parabolic.restoreZoomIsBlocked
|
||||
|| mainLayout.ability.parabolic.restoreZoomIsBlocked
|
||||
|| endLayout.ability.parabolic.restoreZoomIsBlocked
|
||||
|
||||
require.windowsTrackingCount: startLayout.ability.require.windowsTrackingCount +
|
||||
mainLayout.ability.require.windowsTrackingCount +
|
||||
endLayout.ability.require.windowsTrackingCount
|
||||
|
@ -20,6 +20,5 @@
|
||||
import QtQuick 2.7
|
||||
|
||||
Item {
|
||||
property bool restoreZoomIsBlocked: false
|
||||
property int lastIndex: -1
|
||||
}
|
||||
|
@ -1418,8 +1418,8 @@ Item {
|
||||
Ability.ParabolicEffect {
|
||||
id: _parabolic
|
||||
animations: _animations
|
||||
applets: layoutsContainer.applets
|
||||
debug: _debug
|
||||
layouts: layoutsContainer
|
||||
view: latteView
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user