formatter

This commit is contained in:
Zacharias-Brohn
2026-02-24 23:20:11 +01:00
parent 40cd984b6d
commit d56a0260fb
202 changed files with 15037 additions and 15352 deletions
+58 -58
View File
@@ -6,75 +6,75 @@ import qs.Helpers
import qs.Config
Item {
id: root
id: root
property string source: Wallpapers.current
property Image current: one
property Image current: one
property string source: Wallpapers.current
anchors.fill: parent
anchors.fill: parent
onSourceChanged: {
if (!source) {
current = null;
} else if (current === one) {
two.update();
} else {
one.update();
}
}
Component.onCompleted: {
console.log(root.source);
if (source)
Qt.callLater(() => one.update());
}
onSourceChanged: {
if (!source) {
current = null;
} else if (current === one) {
two.update();
} else {
one.update();
}
}
Component.onCompleted: {
console.log(root.source)
if (source)
Qt.callLater(() => one.update());
}
Img {
id: one
Img {
id: one
}
}
Img {
id: two
}
Img {
id: two
component Img: CachingImage {
id: img
}
function update(): void {
if (path === root.source) {
root.current = this;
} else {
path = root.source;
}
}
component Img: CachingImage {
id: img
anchors.fill: parent
function update(): void {
if (path === root.source) {
root.current = this;
} else {
path = root.source;
}
}
opacity: 0
scale: Wallpapers.showPreview ? 1 : 0.8
asynchronous: true
onStatusChanged: {
if (status === Image.Ready) {
root.current = this;
}
}
anchors.fill: parent
asynchronous: true
opacity: 0
scale: Wallpapers.showPreview ? 1 : 0.8
states: State {
name: "visible"
when: root.current === img
states: State {
name: "visible"
when: root.current === img
PropertyChanges {
img.opacity: 1
img.scale: 1
}
}
PropertyChanges {
img.opacity: 1
img.scale: 1
}
}
transitions: Transition {
Anim {
duration: Config.background.wallFadeDuration
properties: "opacity,scale"
target: img
}
}
transitions: Transition {
Anim {
target: img
properties: "opacity,scale"
duration: Config.background.wallFadeDuration
}
}
}
onStatusChanged: {
if (status === Image.Ready) {
root.current = this;
}
}
}
}
+11 -7
View File
@@ -4,28 +4,32 @@ import Quickshell.Wayland
import qs.Config
Loader {
asynchronous: true
active: Config.background.enabled
asynchronous: true
sourceComponent: Variants {
model: Quickshell.screens
PanelWindow {
id: root
required property var modelData
screen: modelData
WlrLayershell.namespace: "ZShell-Wallpaper"
WlrLayershell.exclusionMode: ExclusionMode.Ignore
WlrLayershell.layer: WlrLayer.Bottom
WlrLayershell.namespace: "ZShell-Wallpaper"
color: "transparent"
screen: modelData
anchors {
top: true
bottom: true
left: true
right: true
bottom: true
top: true
}
WallBackground {
}
WallBackground {}
}
}
}