From 53ee6f4103393612b15f3e7561968a441d68eacd Mon Sep 17 00:00:00 2001 From: lucy Date: Thu, 12 Feb 2026 00:24:00 +0100 Subject: [PATCH] fuck transitions --- modules/bar/Workspaces.qml | 2 +- modules/overlays/Wallpaper.qml | 83 ++++++++-------------------------- 2 files changed, 21 insertions(+), 64 deletions(-) diff --git a/modules/bar/Workspaces.qml b/modules/bar/Workspaces.qml index 485c9d9..d8a125e 100644 --- a/modules/bar/Workspaces.qml +++ b/modules/bar/Workspaces.qml @@ -40,7 +40,7 @@ Rectangle { required property var modelData width: !modelData.focused ? 20 : 40 height: isOnMon ? Settings.config.barHeight - Settings.config.barHeight / 2 : 0 - color: modelData.focused ? Colors.primary : Colors.surfaceContainerHigh + color: modelData.focused ? Colors.primary : Colors.surfaceContainer Behavior on width { NumberAnimation { diff --git a/modules/overlays/Wallpaper.qml b/modules/overlays/Wallpaper.qml index e05bd83..b1e94a5 100644 --- a/modules/overlays/Wallpaper.qml +++ b/modules/overlays/Wallpaper.qml @@ -1,75 +1,32 @@ pragma ComponentBehavior: Bound +import Quickshell import QtQuick -import QtQuick.Controls // <--- Needed for StackView import Quickshell.Wayland import qs.settings -WlrLayershell { +Variants { id: root - layer: WlrLayer.Background - keyboardFocus: WlrKeyboardFocus.None - anchors { - top: true - bottom: true - left: true - right: true - } + model: Quickshell.screens + delegate: WlrLayershell { + id: wpShell + aboveWindows: false + exclusionMode: ExclusionMode.Ignore - // We need to accept the screen from Variants - required property var modelData - - // 1. The StackView manages the images - StackView { - id: wallStack - width: parent.width - height: parent.height - - // 2. Define what a "Wallpaper" looks like - Component { - id: wallComponent - Image { - fillMode: Image.PreserveAspectCrop - width: wallStack.width - height: wallStack.height - asynchronous: true // ⚡ VERY IMPORTANT: Prevents lag while loading! - } + required property var modelData + screen: modelData + anchors { + left: true + top: true + bottom: true + right: true } + layer: WlrLayer.Background - // 4. THE ANIMATIONS 🎬 - // When a new wall replaces the old one: - - // New One: Fades In (0 -> 1) - replaceEnter: Transition { - NumberAnimation { - property: "x" - from: wallStack.width - to: 0 - duration: 800 // Slower = Smoother - easing.type: Easing.OutQuad - } - } - - // Old One: Fades Out (1 -> 0) - replaceExit: Transition { - NumberAnimation { - property: "x" - from: 0 - to: -wallStack.width - duration: 800 - easing.type: Easing.OutQuad - } - } - } - - // 5. The Trigger 🔫 - // We listen for the singleton to change, then tell the Stack to update - Connections { - target: Settings - - function onCurrentWallChanged() { - wallStack.replace(wallComponent, { - "source": Settings.currentWall - }); + Image { + anchors.fill: parent + fillMode: Image.PreserveAspectCrop + source: Settings.config.currentWall } + ScreenCorners {} } }