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

0001 /*
0002     SPDX-FileCopyrightText: 2021 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 
0010 import org.kde.latte.core 0.2 as LatteCore
0011 import org.kde.latte.abilities.client 0.1 as AbilityClient
0012 
0013 import "abilities" as Ability
0014 
0015 AbilityClient.AppletAbilities {
0016     id: _abilityContainer
0017     property QtObject tasksModel: null
0018 
0019     readonly property alias launchers: _launchers
0020 
0021     Ability.Launchers {
0022         id: _launchers
0023         bridge: _abilityContainer.bridge
0024         layout: _abilityContainer.layout
0025         tasksModel: _abilityContainer.tasksModel
0026         view: _abilityContainer.myView
0027     }
0028 
0029     //! local properties
0030     readonly property int maxIconSizeInPlasma: Math.max(plasmoid.configuration.iconSize, 16)
0031     readonly property int panelThickness: (root.vertical ? root.width : root.height)
0032 
0033     //! Connections
0034     Connections {
0035         target: _abilityContainer.shortcuts
0036         onDisabledIsStealingGlobalPositionShortcuts: {
0037             plasmoid.configuration.isPreferredForPositionShortcuts = false;
0038         }
0039     }
0040 
0041     Connections {
0042         target: _abilityContainer.launchers
0043         onDisabledIsStealingDroppedLaunchers: {
0044             plasmoid.configuration.isPreferredForDroppedLaunchers = false;
0045         }
0046     }
0047 
0048     Connections {
0049         target: _abilityContainer.userRequests
0050         onSglViewType: {
0051             if (viewType === LatteCore.Types.DockView) {
0052                 plasmoid.configuration.animationLauncherBouncing = true;
0053                 plasmoid.configuration.animationWindowInAttention = true;
0054                 plasmoid.configuration.animationWindowAddedInGroup = true;
0055             } else if (viewType === LatteCore.Types.PanelView) {
0056                 plasmoid.configuration.animationLauncherBouncing = false;
0057                 plasmoid.configuration.animationWindowInAttention = false;
0058                 plasmoid.configuration.animationWindowAddedInGroup = false;
0059             }
0060         }
0061     }
0062 }