noctalia-shell/Components/PanelWithOverlay.qml
2025-07-18 16:57:11 +01:00

44 lines
No EOL
1 KiB
QML

import QtQuick
import Quickshell
import Quickshell.Wayland
import qs.Settings
PanelWindow {
id: outerPanel
property bool showOverlay: true
property int topMargin: 36
property color overlayColor: showOverlay ? Theme.overlay : "transparent"
function dismiss() {
visible = false;
}
function show() {
visible = true;
}
implicitWidth: screen.width
implicitHeight: screen.height
color: visible ? overlayColor : "transparent"
visible: false
WlrLayershell.exclusionMode: ExclusionMode.Ignore
WlrLayershell.keyboardFocus: WlrKeyboardFocus.OnDemand
screen: (typeof modelData !== 'undefined' ? modelData : null)
anchors.top: true
anchors.left: true
anchors.right: true
anchors.bottom: true
margins.top: topMargin
MouseArea {
anchors.fill: parent
onClicked: outerPanel.dismiss()
}
Behavior on color {
ColorAnimation {
duration: 350
easing.type: Easing.InOutCubic
}
}
}