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