mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
Add a settings page to halcyon, which allows for toggling whether the wallpaper is blurred and double tapping on the homescreen to lock the device. This also does a bit of refactoring for folio and halcyon to share the same wallpaper blurring item.
40 lines
No EOL
1 KiB
QML
40 lines
No EOL
1 KiB
QML
// SPDX-FileCopyrightText: 2023-2025 Devin Lin <devin@kde.org>
|
|
// SPDX-License-Identifier: LGPL-2.0-or-later
|
|
|
|
import QtQuick
|
|
import QtQuick.Layouts
|
|
import Qt5Compat.GraphicalEffects
|
|
|
|
Loader {
|
|
id: root
|
|
property real blurOpacity
|
|
property Item wallpaperItem
|
|
|
|
sourceComponent: Item {
|
|
id: wallpaper
|
|
anchors.fill: parent
|
|
|
|
// only take samples from wallpaper when we need the blur for performance
|
|
ShaderEffectSource {
|
|
id: controlledWallpaperSource
|
|
anchors.fill: parent
|
|
|
|
live: blur.visible
|
|
hideSource: false
|
|
visible: false
|
|
sourceItem: root.wallpaperItem
|
|
}
|
|
|
|
// wallpaper blur
|
|
// we attempted to use MultiEffect in the past, but it had very poor performance on the PinePhone
|
|
FastBlur {
|
|
id: blur
|
|
radius: 50
|
|
cached: true
|
|
source: controlledWallpaperSource
|
|
anchors.fill: parent
|
|
visible: opacity > 0
|
|
opacity: root.blurOpacity
|
|
}
|
|
}
|
|
} |