Warning, /plasma/plasma-mobile/containments/homescreens/halcyon/package/contents/ui/SettingsScreen.qml is written in an unsupported language. File is not indexed.
0001 // SPDX-FileCopyrightText: 2023 Devin Lin <devin@kde.org> 0002 // SPDX-License-Identifier: LGPL-2.0-or-later 0003 0004 import QtQuick 0005 import QtQuick.Window 0006 import QtQuick.Layouts 0007 import QtQuick.Controls as QQC2 0008 0009 import org.kde.kirigami 2.20 as Kirigami 0010 0011 import org.kde.plasma.components 3.0 as PC3 0012 import org.kde.plasma.private.mobileshell as MobileShell 0013 0014 Item { 0015 id: root 0016 0017 property real leftMargin 0018 property real rightMargin 0019 property real bottomMargin 0020 property var homeScreen 0021 0022 MouseArea { 0023 id: closeSettings 0024 0025 anchors.top: parent.top 0026 anchors.left: parent.left 0027 anchors.right: parent.right 0028 anchors.bottom: settingsBar.top 0029 0030 onClicked: { 0031 root.homeScreen.settingsOpen = false; 0032 } 0033 } 0034 0035 Item { 0036 id: settingsBar 0037 height: settingsOptions.implicitHeight 0038 0039 Kirigami.Theme.inherit: false 0040 Kirigami.Theme.colorSet: Kirigami.Theme.Complementary 0041 0042 anchors.left: parent.left 0043 anchors.leftMargin: root.leftMargin 0044 anchors.right: parent.right 0045 anchors.rightMargin: parent.rightMargin 0046 anchors.bottom: parent.bottom 0047 anchors.bottomMargin: Kirigami.Units.largeSpacing + root.bottomMargin 0048 0049 RowLayout { 0050 id: settingsOptions 0051 anchors.horizontalCenter: parent.horizontalCenter 0052 spacing: Kirigami.Units.largeSpacing 0053 0054 PC3.ToolButton { 0055 opacity: 0.9 0056 implicitHeight: Kirigami.Units.gridUnit * 4 0057 implicitWidth: Kirigami.Units.gridUnit * 5 0058 0059 contentItem: ColumnLayout { 0060 spacing: Kirigami.Units.largeSpacing 0061 0062 Kirigami.Icon { 0063 Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom 0064 implicitWidth: Kirigami.Units.iconSizes.smallMedium 0065 implicitHeight: Kirigami.Units.iconSizes.smallMedium 0066 source: 'edit-image' 0067 } 0068 0069 QQC2.Label { 0070 Layout.alignment: Qt.AlignHCenter | Qt.AlignTop 0071 text: i18n('Wallpapers') 0072 font.bold: true 0073 } 0074 } 0075 0076 onClicked: { 0077 root.homeScreen.settingsOpen = false; 0078 wallpaperSelectorLoader.active = true; 0079 } 0080 } 0081 0082 PC3.ToolButton { 0083 opacity: 0.9 0084 implicitHeight: Kirigami.Units.gridUnit * 4 0085 implicitWidth: Kirigami.Units.gridUnit * 5 0086 0087 contentItem: ColumnLayout { 0088 spacing: Kirigami.Units.largeSpacing 0089 0090 Kirigami.Icon { 0091 Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom 0092 implicitWidth: Kirigami.Units.iconSizes.smallMedium 0093 implicitHeight: Kirigami.Units.iconSizes.smallMedium 0094 source: 'settings-configure' 0095 } 0096 0097 QQC2.Label { 0098 Layout.alignment: Qt.AlignHCenter | Qt.AlignTop 0099 text: i18n('Settings') 0100 font.bold: true 0101 } 0102 } 0103 0104 onClicked: { 0105 root.homeScreen.settingsOpen = false; 0106 root.homeScreen.openContainmentSettings(); 0107 } 0108 } 0109 } 0110 } 0111 0112 Loader { 0113 id: wallpaperSelectorLoader 0114 asynchronous: true 0115 active: false 0116 0117 onLoaded: { 0118 wallpaperSelectorLoader.item.open(); 0119 } 0120 0121 sourceComponent: MobileShell.WallpaperSelector { 0122 horizontal: root.width > root.height 0123 edge: horizontal ? Qt.LeftEdge : Qt.BottomEdge 0124 bottomMargin: root.bottomMargin 0125 leftMargin: root.leftMargin 0126 rightMargin: root.rightMargin 0127 onClosed: { 0128 wallpaperSelectorLoader.active = false; 0129 } 0130 } 0131 } 0132 }