C++ / fmt (pull_request) Successful in 4s
JS/TS / fmt (pull_request) Successful in 20s
JS/TS / lint (pull_request) Successful in 22s
Python / static (pull_request) Successful in 57s
Rust / fmt (pull_request) Successful in 1m2s
C++ / build (pull_request) Successful in 2m10s
Rust / build (pull_request) Successful in 1m50s
Rust / clippy (pull_request) Successful in 1m25s
Python / verify (pull_request) Successful in 2m58s
C++ / clang-tidy (pull_request) Successful in 7m8s
46 lines
1.0 KiB
QML
46 lines
1.0 KiB
QML
pragma ComponentBehavior: Bound
|
|
|
|
import qs.Components
|
|
import ZShell.Config
|
|
import QtQuick
|
|
|
|
Item {
|
|
id: root
|
|
|
|
property real offsetScale: shouldBeActive ? 0 : 1
|
|
required property var panels
|
|
readonly property Props props: Props {
|
|
}
|
|
readonly property bool shouldBeActive: root.visibilities.sidebar && Config.sidebar.enabled
|
|
required property var visibilities
|
|
|
|
anchors.rightMargin: (-implicitWidth - 5) * offsetScale
|
|
implicitWidth: Config.sidebar.sizes.width
|
|
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.bottomMargin: 0
|
|
anchors.left: parent.left
|
|
anchors.margins: 8
|
|
anchors.top: parent.top
|
|
|
|
sourceComponent: Content {
|
|
implicitWidth: Config.sidebar.sizes.width - Tokens.padding.small * 2
|
|
props: root.props
|
|
visibilities: root.visibilities
|
|
}
|
|
}
|
|
}
|