/usr/share/plasma/plasmoids/org.kde.plasma.minimizeall/contents/ui/main.qml is in plasma-widgets-addons 4:5.12.4-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | /*
* Copyright 2015 Sebastian Kügler <sebas@kde.org>
* Copyright 2016 Anthony Fieroni <bvbfan@abv.bg>
*
* This program 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.
*
* This program 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, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
import QtQuick 2.1
import QtQuick.Layouts 1.1
import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.private.minimizeall 1.0
Item {
id: root
readonly property bool inPanel: (plasmoid.location === PlasmaCore.Types.TopEdge
|| plasmoid.location === PlasmaCore.Types.RightEdge
|| plasmoid.location === PlasmaCore.Types.BottomEdge
|| plasmoid.location === PlasmaCore.Types.LeftEdge)
Layout.minimumWidth: units.gridUnit
Layout.minimumHeight: units.gridUnit
Layout.maximumWidth: inPanel ? units.iconSizeHints.panel : -1
Layout.maximumHeight: inPanel ? units.iconSizeHints.panel : -1
Plasmoid.preferredRepresentation: Plasmoid.fullRepresentation
function activate() {
if (!minimizeall.active) {
minimizeall.minimizeAllWindows();
} else {
minimizeall.unminimizeAllWindows();
}
}
Plasmoid.onActivated: activate()
MinimizeAll {
id: minimizeall
}
PlasmaCore.FrameSvgItem {
id: expandedItem
anchors.fill: parent
imagePath: "widgets/tabbar"
prefix: {
var prefix;
switch (plasmoid.location) {
case PlasmaCore.Types.LeftEdge:
prefix = "west-active-tab";
break;
case PlasmaCore.Types.TopEdge:
prefix = "north-active-tab";
break;
case PlasmaCore.Types.RightEdge:
prefix = "east-active-tab";
break;
default:
prefix = "south-active-tab";
}
if (!hasElementPrefix(prefix)) {
prefix = "active-tab";
}
return prefix;
}
opacity: minimizeall.active ? 1 : 0
Behavior on opacity {
NumberAnimation {
duration: units.shortDuration
easing.type: Easing.InOutQuad
}
}
}
PlasmaCore.IconItem {
id:icon
source: plasmoid.configuration.icon
active: tooltip.containsMouse
anchors.fill: parent
}
PlasmaCore.ToolTipArea {
id: tooltip
anchors.fill: parent
mainText : i18n("Minimize Windows")
subText : i18n("Show the desktop by minimizing all windows")
icon : plasmoid.configuration.icon
MouseArea {
id: mouseArea
anchors.fill: parent
onClicked: activate()
}
//also activate when dragging an item over the plasmoid so a user can easily drag data to the desktop
DropArea {
anchors.fill: parent
onEntered: activateTimer.start()
onExited: activateTimer.stop()
Timer {
id: activateTimer
interval: 250 //to match TaskManager
onTriggered: activate()
}
}
}
}
|