aerothemeplasma/plasma/shells/io.gitgud.wackyideas.desktop/contents/activitymanager/TaskDropArea.qml
wackyideas 6f831d540f Move to new shell plugin & panel, add SDDM sessions
This is a big update which requires existing users to migrate their
desktop setup (Plasmoids, their configurations, layout changes, etc.) to
a new desktop session.

This commit replaces the modified desktop shell (org.kde.plasma.desktop)
with ATP's shell (io.gitgud.wackyideas.desktop) which requires new
session options. This is similar to how plasma-bigscreen and
plasma-mobile are used - logging into a separate session via the login
manager (SDDM). ATP will provide sessions for both X11 and Wayland.

This, along with now providing a forked panel as well, is a step forward
regarding separating ATP's codebase and KDE's upstream code. Further
goals are to be able to further isolate the ATP session from the regular
KDE session in terms of shared configurations, etc.

For existing users - Rerun install_plasmoids.sh and
install_plasma_components.sh, you can delete the old shell
(shells/org.kde.plasma.desktop) and panel plasmoid
(plasmoids/org.kde.panel). As mentioned previously, panel and desktop
layouts, plasmoids and their configurations will not be migrated to the
newly available sessions, so they need to be set up manually.
2025-10-21 13:23:06 +02:00

88 lines
2 KiB
QML

/*
SPDX-FileCopyrightText: 2020 Ivan Cukic <ivan.cukic(at)kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
import QtQuick 2.0
import org.kde.kirigami 2.20 as Kirigami
import org.kde.draganddrop 2.0 as DND
import org.kde.plasma.extras 2.0 as PlasmaExtras
DND.DropArea {
id: root
signal taskDropped(variant mimeData, variant modifiers)
signal clicked()
signal entered()
property int topPadding: 0
property string activityName: ""
property bool selected: false
property string actionTitle: ""
property bool isHovered: false
property bool actionVisible: false
PlasmaExtras.Highlight {
id: dropHighlight
anchors {
fill: parent
// topMargin: icon.height + 3 * Kirigami.Units.smallSpacing
topMargin: root.topPadding
}
visible: root.isHovered
z: -1
}
Text {
id: dropAreaLeftText
anchors {
fill: dropHighlight
leftMargin: Kirigami.Units.gridUnit
rightMargin: Kirigami.Units.gridUnit
}
color: Kirigami.Theme.textColor
visible: root.actionVisible
text: root.actionTitle
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
maximumLineCount: 3
}
anchors {
left: parent.left
right: parent.horizontalCenter
top: parent.top
bottom: parent.bottom
}
preventStealing: true
enabled: true
onDrop: {
root.taskDropped(event.mimeData, event.modifiers);
}
onDragEnter: {
root.isHovered = true;
}
onDragLeave: {
root.isHovered = false;
}
MouseArea {
anchors.fill : parent
onClicked : root.clicked()
hoverEnabled : true
onEntered : root.entered()
Accessible.name : root.activityName
Accessible.role : Accessible.Button
Accessible.selected : root.selected
Accessible.onPressAction : root.clicked()
}
}