C++ / fmt (pull_request) Failing after 6s
C++ / build (pull_request) Failing after 9s
C++ / clang-tidy (pull_request) Failing after 10s
JS/TS / fmt (pull_request) Successful in 13s
JS/TS / lint (pull_request) Successful in 8s
Python / static (pull_request) Successful in 30s
Rust / build (pull_request) Successful in 49s
Rust / fmt (pull_request) Successful in 26s
Python / verify (pull_request) Successful in 1m44s
Rust / clippy (pull_request) Successful in 44s
42 lines
974 B
QML
42 lines
974 B
QML
pragma ComponentBehavior: Bound
|
|
|
|
import Quickshell
|
|
import QtQuick
|
|
import qs.Components
|
|
import ZShell.Config
|
|
|
|
Item {
|
|
id: root
|
|
|
|
property int contentHeight
|
|
property real offsetScale: shouldBeActive ? 0 : 1
|
|
required property ShellScreen screen
|
|
readonly property bool shouldBeActive: screenState.clipboard && Config.clipboard.enabled
|
|
required property ScreenState screenState
|
|
|
|
anchors.bottomMargin: (-implicitHeight - 5) * offsetScale
|
|
implicitHeight: content.implicitHeight + Tokens.padding.small * 2
|
|
implicitWidth: content.implicitWidth + Tokens.padding.small * 2 || 400
|
|
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.centerIn: parent
|
|
|
|
sourceComponent: Content {
|
|
screen: root.screen
|
|
screenState: root.screenState
|
|
}
|
|
}
|
|
}
|