1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-29 16:02:51 -05:00

meta: integrate wallpaper, FileBrowser, StateLayer

- A lot of this is implements patterns implemented by soramannew's
  caelestia-shell
This commit is contained in:
bbedward
2025-07-23 23:20:11 -04:00
parent a0735db7a4
commit ee2cbd708d
33 changed files with 1494 additions and 915 deletions

View File

@@ -0,0 +1,63 @@
import QtQuick
import Quickshell
import Quickshell.Wayland
import Quickshell.Widgets
import qs.Common
import qs.Widgets
Variants {
model: Quickshell.screens
PanelWindow {
id: wallpaperWindow
property var modelData
screen: modelData
WlrLayershell.layer: WlrLayer.Background
WlrLayershell.exclusionMode: ExclusionMode.Ignore
WlrLayershell.keyboardFocus: WlrKeyboardFocus.None
anchors.top: true
anchors.bottom: true
anchors.left: true
anchors.right: true
visible: true
color: "transparent"
Image {
id: wallpaperImage
anchors.fill: parent
source: Prefs.wallpaperPath ? "file://" + Prefs.wallpaperPath : ""
fillMode: Image.PreserveAspectCrop
visible: Prefs.wallpaperPath !== ""
smooth: true
cache: true
// Smooth transition when wallpaper changes
Behavior on opacity {
NumberAnimation {
duration: Appearance.anim.durations.normal
easing.type: Easing.BezierSpline
easing.bezierCurve: Appearance.anim.curves.standard
}
}
onStatusChanged: {
if (status === Image.Error) {
console.warn("Failed to load wallpaper:", source);
}
}
}
// Fallback background color when no wallpaper is set
StyledRect {
anchors.fill: parent
color: Theme.surface
visible: !wallpaperImage.visible
}
}
}