Warning, /plasma/plasma-desktop/applets/taskmanager/package/contents/ui/GroupExpanderOverlay.qml is written in an unsupported language. File is not indexed.
0001 /*
0002 SPDX-FileCopyrightText: 2012-2013 Eike Hein <hein@kde.org>
0003
0004 SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006
0007 import QtQuick 2.15
0008
0009 import org.kde.plasma.core as PlasmaCore
0010 import org.kde.ksvg 1.0 as KSvg
0011 import org.kde.plasma.plasmoid 2.0
0012
0013 KSvg.SvgItem {
0014 id: arrow
0015
0016 anchors {
0017 bottom: arrow.parent.bottom
0018 horizontalCenter: iconBox.horizontalCenter
0019 }
0020
0021 visible: parent.model.IsGroupParent
0022
0023 states: [
0024 State {
0025 name: "top"
0026 when: Plasmoid.location === PlasmaCore.Types.TopEdge
0027 AnchorChanges {
0028 target: arrow
0029 anchors.top: arrow.parent.top
0030 anchors.left: undefined
0031 anchors.right: undefined
0032 anchors.bottom: undefined
0033 anchors.horizontalCenter: iconBox.horizontalCenter
0034 anchors.verticalCenter: undefined
0035 }
0036 },
0037 State {
0038 name: "left"
0039 when: Plasmoid.location === PlasmaCore.Types.LeftEdge
0040 AnchorChanges {
0041 target: arrow
0042 anchors.top: undefined
0043 anchors.left: arrow.parent.left
0044 anchors.right: undefined
0045 anchors.bottom: undefined
0046 anchors.horizontalCenter: undefined
0047 anchors.verticalCenter: iconBox.verticalCenter
0048 }
0049 },
0050 State {
0051 name: "right"
0052 when: Plasmoid.location === PlasmaCore.Types.RightEdge
0053 AnchorChanges {
0054 target: arrow
0055 anchors.top: undefined
0056 anchors.left: undefined
0057 anchors.right: arrow.parent.right
0058 anchors.bottom: undefined
0059 anchors.horizontalCenter: undefined
0060 anchors.verticalCenter: iconBox.verticalCenter
0061 }
0062 }
0063 ]
0064
0065 implicitWidth: Math.min(naturalSize.width, iconBox.width)
0066 implicitHeight: Math.min(naturalSize.height, iconBox.width)
0067
0068 imagePath: "widgets/tasks"
0069 elementId: elementForLocation()
0070
0071 function elementForLocation() {
0072 switch (Plasmoid.location) {
0073 case PlasmaCore.Types.LeftEdge:
0074 return "group-expander-left";
0075 case PlasmaCore.Types.TopEdge:
0076 return "group-expander-top";
0077 case PlasmaCore.Types.RightEdge:
0078 return "group-expander-right";
0079 case PlasmaCore.Types.BottomEdge:
0080 default:
0081 return "group-expander-bottom";
0082 }
0083 }
0084 }