mirror of
https://gitgud.io/wackyideas/aerothemeplasma.git
synced 2026-06-19 03:45:50 +00:00
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.
72 lines
1.9 KiB
QML
72 lines
1.9 KiB
QML
/*
|
|
SPDX-FileCopyrightText: 2013 Marco Martin <mart@kde.org>
|
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
*/
|
|
|
|
import QtQuick 2.15
|
|
import QtQuick.Layouts 1.15
|
|
|
|
import org.kde.plasma.core as PlasmaCore
|
|
import org.kde.plasma.plasmoid 2.0
|
|
import org.kde.kirigami 2.20 as Kirigami
|
|
|
|
Kirigami.Icon {
|
|
property PlasmoidItem plasmoidItem
|
|
readonly property bool inPanel: [PlasmaCore.Types.TopEdge, PlasmaCore.Types.RightEdge, PlasmaCore.Types.BottomEdge, PlasmaCore.Types.LeftEdge]
|
|
.includes(Plasmoid.location)
|
|
|
|
Layout.minimumWidth: {
|
|
switch (Plasmoid.formFactor) {
|
|
case PlasmaCore.Types.Vertical:
|
|
return 0;
|
|
case PlasmaCore.Types.Horizontal:
|
|
return height;
|
|
default:
|
|
return Kirigami.Units.gridUnit * 3;
|
|
}
|
|
}
|
|
|
|
Layout.minimumHeight: {
|
|
switch (Plasmoid.formFactor) {
|
|
case PlasmaCore.Types.Vertical:
|
|
return width;
|
|
case PlasmaCore.Types.Horizontal:
|
|
return 0;
|
|
default:
|
|
return Kirigami.Units.gridUnit * 3;
|
|
}
|
|
}
|
|
|
|
source: Plasmoid.icon || "plasma"
|
|
active: mouseArea.containsMouse
|
|
|
|
activeFocusOnTab: true
|
|
|
|
Keys.onPressed: event => {
|
|
switch (event.key) {
|
|
case Qt.Key_Space:
|
|
case Qt.Key_Enter:
|
|
case Qt.Key_Return:
|
|
case Qt.Key_Select:
|
|
Plasmoid.activated();
|
|
event.accepted = true; // BUG 481393: Prevent system tray from receiving the event
|
|
break;
|
|
}
|
|
}
|
|
|
|
Accessible.name: Plasmoid.title
|
|
Accessible.description: plasmoidItem.toolTipSubText ?? ""
|
|
Accessible.role: Accessible.Button
|
|
|
|
MouseArea {
|
|
id: mouseArea
|
|
|
|
property bool wasExpanded: false
|
|
|
|
anchors.fill: parent
|
|
hoverEnabled: true
|
|
onPressed: wasExpanded = plasmoidItem.expanded
|
|
onClicked: plasmoidItem.expanded = !wasExpanded
|
|
}
|
|
}
|