import QtQuick import Quickshell import qs.Common import qs.Modals.Common DankModal { id: overlay property var daemon: null readonly property var pluginData: (daemon && daemon.pluginData) ? daemon.pluginData : ({}) readonly property real availableWidth: screenWidth > 0 ? screenWidth : 1920 readonly property real availableHeight: screenHeight > 0 ? screenHeight : 1080 function requestClose() { if (overlay.daemon) overlay.daemon.closeOverlay(); else overlay.close(); } layerNamespace: "dms:plugins:gameBar" // Overlay layer puts the widgets above fullscreen windows, like the Xbox Game Bar. useOverlayLayer: true positioning: "center" shouldBeVisible: false closeOnEscapeKey: true closeOnBackgroundClick: true showBackground: true backgroundOpacity: Math.max(0, Math.min(0.95, (pluginData.backdropOpacity ?? 70) / 100)) onBackgroundClicked: overlay.requestClose() // The modal itself is the full screen; the widgets inside are the visible chrome. backgroundColor: "transparent" borderWidth: 0 cornerRadius: 0 enableShadow: false // A full-screen surface should fade, not scale/slide in. animationScaleCollapsed: 1 animationOffset: 0 modalWidth: availableWidth modalHeight: availableHeight content: Component { Panel { overlayRef: overlay } } }