working wallpaper switcher ui
This commit is contained in:
parent
37a134f077
commit
e06de04203
@ -5,6 +5,8 @@ import "."
|
||||
|
||||
WlrLayershell {
|
||||
id: root
|
||||
property string wall: WallpaperStore.currentWall
|
||||
onWallChanged: console.log("new wall!:" + wall)
|
||||
|
||||
// 1. Send it to the bottom of the stack!
|
||||
layer: WlrLayer.Background
|
||||
@ -27,20 +29,7 @@ WlrLayershell {
|
||||
id: actualWall
|
||||
anchors.fill: parent
|
||||
source: WallpaperStore.currentWall
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
|
||||
Behavior on source {
|
||||
NumberAnimation {
|
||||
duration: 500
|
||||
}
|
||||
}
|
||||
onSourceChanged: console.log("🖼️ Wallpaper noticed change! New source: " + source)
|
||||
}
|
||||
|
||||
// Bonus: A dark rectangle to dim the wallpaper slightly?
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: "black"
|
||||
opacity: 0.2
|
||||
onSourceChanged: console.log("🖼️ Wallpaper noticed change! New source: " + wall)
|
||||
}
|
||||
}
|
||||
|
||||
12
shell.qml
12
shell.qml
@ -1,11 +1,17 @@
|
||||
//@ pragma UseQApplication
|
||||
import qs.modules.bar
|
||||
import "./modules/bar/"
|
||||
import Quickshell
|
||||
import "./modules/wallpaper"
|
||||
import "./modules/wallpaper/"
|
||||
|
||||
Scope {
|
||||
WallSwitcher {}
|
||||
Wallpaper {}
|
||||
Variants {
|
||||
id: wallVariants
|
||||
model: Quickshell.screens
|
||||
delegate: Wallpaper {
|
||||
screen: modelData
|
||||
}
|
||||
}
|
||||
Variants {
|
||||
id: barVariants
|
||||
model: Quickshell.screens
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user