Files
z-bar-qt/Modules/Settings/Wrapper.qml
T
2026-10-23 00:05:08 +02:00

45 lines
1.0 KiB
QML

pragma ComponentBehavior: Bound
import Quickshell
import QtQuick
import ZShell.Config
import ZShell.Components
import qs.Components
Item {
id: root
property real offsetScale: shouldBeActive ? 0 : 1
required property var panels
property string queuedMode: "wallpaper"
required property ShellScreen screen
readonly property bool shouldBeActive: screenState.settings
required property ScreenState screenState
implicitHeight: content.implicitHeight
implicitWidth: content.implicitWidth
opacity: 1 - offsetScale
visible: offsetScale < 1
Behavior on offsetScale {
Anim {
duration: Tokens.anim.durations.expressiveDefaultSpatial
easing: Tokens.anim.expressiveDefaultSpatial
}
}
Loader {
id: content
active: root.shouldBeActive || root.visible
anchors.bottom: parent.bottom
anchors.horizontalCenter: parent.horizontalCenter
sourceComponent: Content {
sState.animatingContainer: content.opacity < 1
sState.currentPageIdx: ["wallpaper"].indexOf(root.queuedMode)
sState.screen: root.screen
}
}
}