Files
z-bar-qt/Modules/Dashboard/Wrapper.qml
T
zach 84d5abcaab
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
feat: dashboard show on hover, media and weather tabs added
2026-09-20 12:59:53 +02:00

35 lines
848 B
QML

pragma ComponentBehavior: Bound
import Quickshell
import QtQuick
import qs.Components
import ZShell.Config
Item {
id: root
readonly property real nonAnimHeight: state === "visible" ? (content.item?.nonAnimHeight ?? 0) : 0
required property real offsetScale
readonly property bool shouldBeActive: root.screenState.dashboard && Config.dashboard.enabled
required property ScreenState screenState
anchors.top: parent.top
anchors.topMargin: (-implicitHeight - 5) * offsetScale
implicitHeight: content.implicitHeight
implicitWidth: content.implicitWidth || 854
opacity: 1 - offsetScale
visible: offsetScale < 1
Loader {
id: content
active: root.shouldBeActive || root.visible
anchors.bottom: parent.bottom
anchors.horizontalCenter: parent.horizontalCenter
sourceComponent: Content {
screenState: root.screenState
}
}
}