2024-01-02 03:30:55 +00:00
|
|
|
// SPDX-FileCopyrightText: 2023 Devin Lin <devin@kde.org>
|
|
|
|
|
// SPDX-License-Identifier: LGPL-2.0-or-later
|
|
|
|
|
|
|
|
|
|
import QtQuick
|
|
|
|
|
import QtQuick.Window
|
|
|
|
|
import QtQuick.Layouts
|
|
|
|
|
import QtQuick.Controls as QQC2
|
|
|
|
|
|
|
|
|
|
import org.kde.kirigami 2.20 as Kirigami
|
|
|
|
|
|
|
|
|
|
import org.kde.plasma.components 3.0 as PC3
|
|
|
|
|
import org.kde.plasma.private.mobileshell as MobileShell
|
|
|
|
|
|
|
|
|
|
Item {
|
|
|
|
|
id: root
|
|
|
|
|
|
|
|
|
|
property real leftMargin
|
|
|
|
|
property real rightMargin
|
|
|
|
|
property real bottomMargin
|
|
|
|
|
property var homeScreen
|
|
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
|
id: closeSettings
|
|
|
|
|
|
|
|
|
|
anchors.top: parent.top
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
anchors.bottom: settingsBar.top
|
|
|
|
|
|
|
|
|
|
onClicked: {
|
|
|
|
|
root.homeScreen.settingsOpen = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Item {
|
|
|
|
|
id: settingsBar
|
|
|
|
|
height: settingsOptions.implicitHeight
|
|
|
|
|
|
|
|
|
|
Kirigami.Theme.inherit: false
|
|
|
|
|
Kirigami.Theme.colorSet: Kirigami.Theme.Complementary
|
|
|
|
|
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.leftMargin: root.leftMargin
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
anchors.rightMargin: parent.rightMargin
|
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
|
anchors.bottomMargin: Kirigami.Units.largeSpacing + root.bottomMargin
|
|
|
|
|
|
|
|
|
|
RowLayout {
|
|
|
|
|
id: settingsOptions
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
spacing: Kirigami.Units.largeSpacing
|
|
|
|
|
|
|
|
|
|
PC3.ToolButton {
|
|
|
|
|
opacity: 0.9
|
|
|
|
|
implicitHeight: Kirigami.Units.gridUnit * 4
|
|
|
|
|
implicitWidth: Kirigami.Units.gridUnit * 5
|
|
|
|
|
|
|
|
|
|
contentItem: ColumnLayout {
|
|
|
|
|
spacing: Kirigami.Units.largeSpacing
|
|
|
|
|
|
|
|
|
|
Kirigami.Icon {
|
|
|
|
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
|
|
|
|
implicitWidth: Kirigami.Units.iconSizes.smallMedium
|
|
|
|
|
implicitHeight: Kirigami.Units.iconSizes.smallMedium
|
|
|
|
|
source: 'edit-image'
|
|
|
|
|
}
|
2024-07-03 22:38:10 +00:00
|
|
|
|
2024-01-02 03:30:55 +00:00
|
|
|
QQC2.Label {
|
|
|
|
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
|
|
|
|
text: i18n('Wallpapers')
|
|
|
|
|
font.bold: true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onClicked: {
|
|
|
|
|
root.homeScreen.settingsOpen = false;
|
Folio/Halcyon: Expand Background Blur Effect using a MaskLayer
This merge request expands upon the folio and halcyon background blur effects, making the folio background blur include the backgrounds of folder icons, the favorites bar, and wallpaper selector, and for halcyon, it now includes the folder icons, app library, search, and wallpaper selector. To accomplish this, a mask layer plugin was created to easily attach to these elements. This way, we can use a `OpacityMask` to cut out from the existing blur layer, thus hopefully keeping the performance cost low. And with my limited testing, it does at least seems to run about the same on my oneplus 6t, though it is not really a low end device, so I can not fairly judge the impact for something slower (eg. PinePhone). To be on the safe side, a third option was also added to the folio settings, allowing for the ability to toggle back to the old functionality if needed.




2025-06-27 18:27:30 +00:00
|
|
|
root.homeScreen.wallpaperSelectorTriggered();
|
2024-01-02 03:30:55 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
PC3.ToolButton {
|
|
|
|
|
opacity: 0.9
|
|
|
|
|
implicitHeight: Kirigami.Units.gridUnit * 4
|
|
|
|
|
implicitWidth: Kirigami.Units.gridUnit * 5
|
|
|
|
|
|
|
|
|
|
contentItem: ColumnLayout {
|
|
|
|
|
spacing: Kirigami.Units.largeSpacing
|
|
|
|
|
|
|
|
|
|
Kirigami.Icon {
|
|
|
|
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
|
|
|
|
implicitWidth: Kirigami.Units.iconSizes.smallMedium
|
|
|
|
|
implicitHeight: Kirigami.Units.iconSizes.smallMedium
|
|
|
|
|
source: 'settings-configure'
|
|
|
|
|
}
|
2024-07-03 22:38:10 +00:00
|
|
|
|
2024-01-02 03:30:55 +00:00
|
|
|
QQC2.Label {
|
|
|
|
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
|
|
|
|
text: i18n('Settings')
|
|
|
|
|
font.bold: true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onClicked: {
|
|
|
|
|
root.homeScreen.settingsOpen = false;
|
2025-06-25 23:22:58 +00:00
|
|
|
|
|
|
|
|
if (settingsWindowLoader.active) {
|
|
|
|
|
// Ensure that if the window is already opened, it gets raised to the top
|
|
|
|
|
settingsWindowLoader.item.hide();
|
|
|
|
|
settingsWindowLoader.item.showMaximized();
|
|
|
|
|
} else {
|
|
|
|
|
settingsWindowLoader.active = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Only load settings window when visible
|
|
|
|
|
Loader {
|
|
|
|
|
id: settingsWindowLoader
|
|
|
|
|
asynchronous: true
|
|
|
|
|
active: false
|
|
|
|
|
|
|
|
|
|
onLoaded: item.showMaximized();
|
|
|
|
|
|
|
|
|
|
sourceComponent: SettingsWindow {
|
|
|
|
|
onVisibleChanged: {
|
|
|
|
|
if (!visible) {
|
|
|
|
|
settingsWindowLoader.active = false;
|
2024-01-02 03:30:55 +00:00
|
|
|
}
|
|
|
|
|
}
|
2025-06-25 23:22:58 +00:00
|
|
|
onRequestConfigureMenu: {
|
|
|
|
|
root.homeScreen.openContainmentSettings();
|
|
|
|
|
}
|
2024-01-02 03:30:55 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|