C++ / fmt (pull_request) Successful in 4s
JS/TS / lint (pull_request) Successful in 16s
JS/TS / fmt (pull_request) Successful in 23s
Python / fmt (pull_request) Successful in 33s
Python / lint (pull_request) Successful in 32s
Python / test (pull_request) Successful in 1m0s
Python / typecheck (pull_request) Failing after 1m8s
Rust / fmt (pull_request) Successful in 34s
Rust / build (pull_request) Successful in 1m46s
C++ / build (pull_request) Successful in 2m33s
Rust / clippy (pull_request) Successful in 1m30s
Python / buildcheck (pull_request) Successful in 2m41s
C++ / clang-tidy (pull_request) Successful in 7m9s
47 lines
1.4 KiB
QML
47 lines
1.4 KiB
QML
pragma ComponentBehavior: Bound
|
|
|
|
import Quickshell
|
|
import QtQuick
|
|
import qs.Components
|
|
import ZShell.Config
|
|
|
|
Item {
|
|
id: root
|
|
|
|
readonly property PersistentProperties dashState: PersistentProperties {
|
|
property date currentDate: new Date()
|
|
property int currentTab
|
|
|
|
reloadableId: "dashboardState"
|
|
}
|
|
required property bool horizontal
|
|
readonly property real nonAnimHeight: state === "visible" ? (content.item?.nonAnimHeight ?? 0) : 0
|
|
required property real offsetScale
|
|
readonly property bool shouldBeActive: root.visibilities.dashboard && Config.dashboard.enabled
|
|
required property PersistentProperties visibilities
|
|
|
|
anchors.left: horizontal ? undefined : parent.left
|
|
anchors.leftMargin: horizontal ? 0 : (-implicitWidth - 5) * offsetScale
|
|
anchors.top: horizontal ? parent.top : undefined
|
|
anchors.topMargin: horizontal ? (-implicitHeight - 5) * offsetScale : 0
|
|
implicitHeight: content.implicitHeight
|
|
implicitWidth: content.implicitWidth || 854
|
|
opacity: 1 - offsetScale
|
|
visible: offsetScale < 1
|
|
|
|
Loader {
|
|
id: content
|
|
|
|
active: root.shouldBeActive || root.visible
|
|
anchors.bottom: root.horizontal ? parent.bottom : undefined
|
|
anchors.horizontalCenter: root.horizontal ? parent.horizontalCenter : undefined
|
|
anchors.right: root.horizontal ? undefined : parent.right
|
|
anchors.verticalCenter: root.horizontal ? undefined : parent.verticalCenter
|
|
|
|
sourceComponent: Content {
|
|
dashState: root.dashState
|
|
visibilities: root.visibilities
|
|
}
|
|
}
|
|
}
|