C++ / fmt (pull_request) Successful in 5s
JS/TS / fmt (pull_request) Successful in 17s
JS/TS / lint (pull_request) Successful in 16s
Python / fmt (pull_request) Successful in 31s
Python / lint (pull_request) Successful in 41s
Python / test (pull_request) Successful in 1m5s
Python / typecheck (pull_request) Successful in 1m15s
Rust / clippy (pull_request) Failing after 12m43s
Rust / fmt (pull_request) Failing after 12m57s
Rust / build (pull_request) Failing after 13m33s
Python / buildcheck (pull_request) Failing after 13m45s
C++ / clang-tidy (pull_request) Failing after 14m23s
C++ / build (pull_request) Failing after 14m25s
83 lines
1.8 KiB
QML
83 lines
1.8 KiB
QML
pragma ComponentBehavior: Bound
|
|
|
|
import Quickshell
|
|
import Quickshell.Hyprland
|
|
import QtQuick
|
|
import QtQuick.Layouts
|
|
import qs.Components
|
|
import qs.Modules
|
|
import ZShell.Config
|
|
import qs.Helpers
|
|
import qs.Modules.SysTray
|
|
import qs.Modules.SysTray.Widgets
|
|
|
|
Item {
|
|
id: root
|
|
|
|
readonly property int contentHeight: Config.bar.height + padding * 2
|
|
readonly property int exclusiveZone: Config.bar.autoHide ? Config.bar.border : contentHeight
|
|
required property bool fullscreen
|
|
property bool isHovered
|
|
readonly property int padding: Math.max(Tokens.padding.smaller, Config.bar.border)
|
|
required property Wrapper popouts
|
|
required property ClipWrapper popoutsWrapper
|
|
required property ShellScreen screen
|
|
readonly property bool shouldBeVisible: !fullscreen && (!Config.bar.autoHide || visibilities.bar || isHovered)
|
|
readonly property int vPadding: 6
|
|
required property PersistentProperties visibilities
|
|
|
|
function checkPopout(x: real): void {
|
|
content.item?.checkPopout(x);
|
|
}
|
|
|
|
implicitHeight: fullscreen ? 0 : Config.bar.border
|
|
visible: height > Config.bar.border
|
|
|
|
states: State {
|
|
name: "visible"
|
|
when: root.shouldBeVisible
|
|
|
|
PropertyChanges {
|
|
root.implicitHeight: root.contentHeight
|
|
}
|
|
}
|
|
transitions: [
|
|
Transition {
|
|
from: ""
|
|
to: "visible"
|
|
|
|
Anim {
|
|
property: "implicitHeight"
|
|
target: root
|
|
}
|
|
},
|
|
Transition {
|
|
from: "visible"
|
|
to: ""
|
|
|
|
Anim {
|
|
property: "implicitHeight"
|
|
target: root
|
|
}
|
|
}
|
|
]
|
|
|
|
Loader {
|
|
id: content
|
|
|
|
active: root.shouldBeVisible || root.visible
|
|
anchors.bottom: parent.bottom
|
|
anchors.left: parent.left
|
|
anchors.right: parent.right
|
|
|
|
sourceComponent: Bar {
|
|
fullscreen: root.fullscreen
|
|
height: root.contentHeight
|
|
popouts: root.popouts
|
|
popoutsWrapper: root.popoutsWrapper
|
|
screen: root.screen
|
|
visibilities: root.visibilities
|
|
}
|
|
}
|
|
}
|