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.
176 lines
4.8 KiB
QML
176 lines
4.8 KiB
QML
/*
|
|
SPDX-FileCopyrightText: 2013 Marco Martin <mart@kde.org>
|
|
SPDX-FileCopyrightText: 2014 Ivan Cukic <ivan.cukic@kde.org>
|
|
|
|
SPDX-License-Identifier: LGPL-2.0-or-later
|
|
*/
|
|
|
|
import QtQuick 2.0
|
|
import QtQuick.Controls as QQC2
|
|
|
|
import org.kde.plasma.components 3.0 as PlasmaComponents
|
|
import org.kde.kirigami 2.20 as Kirigami
|
|
import org.kde.config as KConfig // KAuthorized
|
|
import org.kde.kcmutils // KCMLauncher
|
|
|
|
|
|
FocusScope {
|
|
id: root
|
|
signal closed()
|
|
|
|
function parentClosed() {
|
|
activityBrowser.parentClosed();
|
|
}
|
|
|
|
property Item rootItem
|
|
|
|
//this is used to perfectly align the filter field and delegates
|
|
property int cellWidth: Kirigami.Units.iconSizes.sizeForLabels * 30
|
|
property int spacing: 2 * Kirigami.Units.smallSpacing
|
|
|
|
property bool showSwitcherOnly: false
|
|
|
|
width: Kirigami.Units.gridUnit * 18
|
|
implicitWidth: activityBrowser.width
|
|
implicitHeight: activityBrowser.height
|
|
|
|
|
|
Item {
|
|
id: activityBrowser
|
|
|
|
property int spacing: 2 * Kirigami.Units.smallSpacing
|
|
|
|
signal closeRequested()
|
|
|
|
Keys.onPressed: {
|
|
if (event.key === Qt.Key_Escape) {
|
|
if (heading.searchString.length > 0) {
|
|
heading.searchString = "";
|
|
} else {
|
|
activityBrowser.closeRequested();
|
|
}
|
|
|
|
} else if (event.key === Qt.Key_Up) {
|
|
activityList.selectPrevious();
|
|
|
|
} else if (event.key === Qt.Key_Down) {
|
|
activityList.selectNext();
|
|
|
|
} else if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) {
|
|
activityList.openSelected();
|
|
|
|
} else if (event.key === Qt.Key_Tab) {
|
|
// console.log("TAB KEY");
|
|
|
|
} else {
|
|
// console.log("OTHER KEY");
|
|
// event.accepted = false;
|
|
// heading.forceActiveFocus();
|
|
}
|
|
}
|
|
|
|
// Rectangle {
|
|
// anchors.fill : parent
|
|
// opacity : .4
|
|
// color : "white"
|
|
// }
|
|
|
|
Heading {
|
|
id: heading
|
|
|
|
anchors {
|
|
top: parent.top
|
|
left: parent.left
|
|
right: parent.right
|
|
|
|
leftMargin: Kirigami.Units.smallSpacing
|
|
rightMargin: Kirigami.Units.smallSpacing
|
|
}
|
|
|
|
visible: !root.showSwitcherOnly
|
|
|
|
onCloseRequested: activityBrowser.closeRequested()
|
|
|
|
}
|
|
|
|
QQC2.ScrollView {
|
|
id: scroll
|
|
clip: true
|
|
anchors {
|
|
top: heading.visible ? heading.bottom : parent.top
|
|
bottom: bottomPanel.visible ? bottomPanel.top : parent.bottom
|
|
left: parent.left
|
|
right: parent.right
|
|
topMargin: activityBrowser.spacing
|
|
leftMargin: 2
|
|
rightMargin: 2
|
|
}
|
|
|
|
ActivityList {
|
|
id: activityList
|
|
showSwitcherOnly: root.showSwitcherOnly
|
|
filterString: heading.searchString.toLowerCase()
|
|
itemsWidth: root.width - Kirigami.Units.largeSpacing*3 - Kirigami.Units.mediumSpacing
|
|
}
|
|
}
|
|
Rectangle {
|
|
anchors.fill: scroll
|
|
anchors.margins: -2
|
|
|
|
color: "white"
|
|
opacity: 0.3
|
|
border.width: 1
|
|
border.color: "#90000000"
|
|
z: -1
|
|
}
|
|
|
|
Item {
|
|
id: bottomPanel
|
|
|
|
height: newActivityButton.height + Kirigami.Units.gridUnit
|
|
|
|
visible: !root.showSwitcherOnly
|
|
|
|
anchors {
|
|
bottom: parent.bottom
|
|
left: parent.left
|
|
right: parent.right
|
|
}
|
|
|
|
QQC2.Button {
|
|
id: newActivityButton
|
|
|
|
text: i18nd("plasma_shell_org.kde.plasma.desktop", "Create activity…")
|
|
icon.name: "list-add"
|
|
anchors.right: parent.right
|
|
anchors.bottom: parent.bottom
|
|
anchors.rightMargin: Kirigami.Units.largeSpacing
|
|
anchors.bottomMargin: Kirigami.Units.largeSpacing
|
|
//width: parent.width
|
|
|
|
onClicked: KCMLauncher.openSystemSettings("kcm_activities", "newActivity")
|
|
|
|
visible: KConfig.KAuthorized.authorize("plasma-desktop/add_activities")
|
|
opacity: newActivityDialog.status == Loader.Ready ?
|
|
1 - newActivityDialog.item.opacity : 1
|
|
}
|
|
|
|
Loader {
|
|
id: newActivityDialog
|
|
|
|
z: 100
|
|
|
|
anchors.bottom: newActivityButton.bottom
|
|
anchors.left: newActivityButton.left
|
|
anchors.right: newActivityButton.right
|
|
|
|
}
|
|
}
|
|
|
|
onCloseRequested: root.closed()
|
|
|
|
anchors.fill: parent
|
|
}
|
|
|
|
}
|
|
|