shift-shell/shell/contents/configuration/ContainmentConfiguration.qml
Devin Lin a39401100f shell: Rework configuration implementation
This reworks the implementation of the applet/containment configuration
so that it is more optimized for the mobile experience and fixes lateral
navigation (between categories).

Changes:
- Always show a list of category modules (switching from the navigation
  tab bar) in order to support more modules at once
- Split the wallpaper and containment switching view into two modules
- Add a close button at the top
- Add an animation when the window opens and closes
- Refactor the code so that it is clear which files are imported by the
  shell, and which are implementation details
2025-10-05 09:47:35 -04:00

42 lines
1.4 KiB
QML

// SPDX-FileCopyrightText: 2013 Marco Martin <mart@kde.org>
// SPDX-FileCopyrightText: 2022 Devin Lin <devin@kde.org>
// SPDX-License-Identifier: GPL-2.0-or-later
import QtQuick 2.12
import QtQuick.Layouts 1.0
import QtQuick.Window 2.2
import QtQuick.Controls 2.15 as Controls
import org.kde.kirigami 2.20 as Kirigami
import org.kde.plasma.components 3.0 as PlasmaComponents3
import org.kde.plasma.core as PlasmaCore
import org.kde.plasma.configuration 2.0
import org.kde.ksvg 1.0 as KSvg
/**
* This component is loaded by libplasma when the "configuration window" is requested for a containment.
*/
AppletConfiguration {
id: root
isContainment: true
loadApp: true
//BEGIN model
globalConfigModel: globalContainmentConfigModel
ConfigModel {
id: globalContainmentConfigModel
ConfigCategory {
name: i18n("Wallpaper")
icon: "viewimage-symbolic"
source: "ChangeWallpaperModule.qml" // This is a relative path from inside private (since loading is invoked from there)
}
ConfigCategory {
name: i18n("Change Homescreen")
icon: "exchange-positions"
source: "ChangeContainmentModule.qml" // This is a relative path from inside private (since loading is invoked from there)
visible: configDialog.containmentPluginsConfigModel.count > 1
}
}
//END model
}