Warning, /plasma/latte-dock/containment/package/contents/ui/abilities/ParabolicEffect.qml is written in an unsupported language. File is not indexed.

0001 /*
0002     SPDX-FileCopyrightText: 2020 Michail Vourlakos <mvourlakos@gmail.com>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 import QtQuick 2.7
0007 
0008 import org.kde.plasma.plasmoid 2.0
0009 import org.kde.plasma.core 2.0 as PlasmaCore
0010 
0011 import org.kde.latte.core 0.2 as LatteCore
0012 
0013 import "./privates" as Ability
0014 
0015 Ability.ParabolicEffectPrivate {
0016     isEnabled: factor.zoom>1 && !root.inConfigureAppletsMode
0017     factor.zoom: {
0018         var storedZoom = LatteCore.WindowSystem.compositingActive && animations.active ? ( 1 + (plasmoid.configuration.zoomLevel / 20) ) : 1;
0019         var maxSize = storedZoom * metrics.iconSize;
0020         //! round to nearest odd number
0021         maxSize = 2 * Math.round(Math.round(maxSize) / 2);
0022 
0023         //! this way we make sure that the iconSize at the maximum of its parabolic effect is an integer
0024         return (maxSize/metrics.iconSize);
0025     }
0026     factor.maxZoom: Math.max(factor.zoom, animations.requirements.zoomFactor)
0027     factor.marginThicknessZoomInPercentage: settings ? settings.thicknessMarginInfluence : 1.0 //100%
0028     restoreZoomIsBlocked: restoreZoomIsBlockedFromApplet || layouts.contextMenuIsShown
0029     spread: settings ? settings.parabolicSpread : 3
0030 
0031     currentParabolicItem: view ? view.parabolic.currentItem : null
0032 }