nosignal-shell/modules/bar/BarWrapper.qml
Robin Seger c588794b20
feat: fullscreen notification & toasts overlay (#1276)
* reworked fullscreen mode as transforming shell

* controlcenter configuring of toasts & notifs

* fix animation on fs switch

* border rounding & shadow animation

* change controlcenter notifications layout

* stay on WlrLayer.Overlay, use Anim

* ci: update action versions

* qmlformat

* format take two

* third time's the charm

* fix: special workspace fullscreen

* fix: bar width border.thickness on non-persistent behaviour

* merge fix

* stop layout shift on close

* last few conventions sorted

* linting

* maximized state to fullscreen

---------

Co-authored-by: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>
2026-03-29 15:22:00 +11:00

91 lines
2.6 KiB
QML

pragma ComponentBehavior: Bound
import QtQuick
import Quickshell
import qs.components
import qs.config
import qs.modules.bar.popouts as BarPopouts
Item {
id: root
required property ShellScreen screen
required property DrawerVisibilities visibilities
required property BarPopouts.Wrapper popouts
required property bool disabled
required property bool fullscreen
readonly property int clampedWidth: Math.max(Config.border.minThickness, implicitWidth)
readonly property int padding: Math.max(Appearance.padding.smaller, Config.border.thickness)
readonly property int contentWidth: Config.bar.sizes.innerWidth + padding * 2
readonly property int exclusiveZone: !disabled && (Config.bar.persistent || visibilities.bar) ? contentWidth : Config.border.thickness
readonly property bool shouldBeVisible: !fullscreen && !disabled && (Config.bar.persistent || visibilities.bar || isHovered)
property bool isHovered
function closeTray(): void {
(content.item as Bar)?.closeTray();
}
function checkPopout(y: real): void {
(content.item as Bar)?.checkPopout(y);
}
function handleWheel(y: real, angleDelta: point): void {
(content.item as Bar)?.handleWheel(y, angleDelta);
}
clip: true
visible: width > 0
implicitWidth: fullscreen ? 0 : Config.border.thickness
states: State {
name: "visible"
when: root.shouldBeVisible
PropertyChanges {
root.implicitWidth: root.contentWidth
}
}
transitions: [
Transition {
from: ""
to: "visible"
Anim {
target: root
property: "implicitWidth"
duration: Appearance.anim.durations.expressiveDefaultSpatial
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
}
},
Transition {
from: "visible"
to: ""
Anim {
target: root
property: "implicitWidth"
easing.bezierCurve: Appearance.anim.curves.emphasized
}
}
]
Loader {
id: content
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.right: parent.right
active: root.shouldBeVisible || root.visible
sourceComponent: Bar {
width: root.contentWidth
screen: root.screen
visibilities: root.visibilities
popouts: root.popouts // qmllint disable incompatible-type
fullscreen: root.fullscreen
}
}
}