refractor: DeltaruneQuickshell -> Shell
This commit is contained in:
47
Shell/WLRLayerDialogBox.qml
Normal file
47
Shell/WLRLayerDialogBox.qml
Normal file
@@ -0,0 +1,47 @@
|
||||
import Quickshell
|
||||
import Quickshell.Wayland
|
||||
import Quickshell.Io
|
||||
import "DialogBox"
|
||||
|
||||
PanelWindow {
|
||||
id: baseDialog
|
||||
anchors {
|
||||
bottom: true
|
||||
}
|
||||
property bool isOpen: false
|
||||
property string text: "(The power of Hyprland\nshines within you.)"
|
||||
|
||||
WlrLayershell.layer: WlrLayer.Overlay
|
||||
WlrLayershell.focusable: false
|
||||
WlrLayershell.keyboardFocus: WlrKeyboardFocus.None
|
||||
WlrLayershell.namespace: "deltarune-quickshell-dialogbox"
|
||||
|
||||
visible: isOpen
|
||||
exclusionMode: ExclusionMode.Ignore
|
||||
aboveWindows: true
|
||||
focusable: false
|
||||
|
||||
mask: Region {}
|
||||
|
||||
implicitHeight: 378
|
||||
implicitWidth: 1334 - 147
|
||||
color: '#000000ff'
|
||||
|
||||
DialogBox {
|
||||
text: baseDialog.text
|
||||
}
|
||||
|
||||
IpcHandler {
|
||||
target: "deltarune.dialog"
|
||||
enabled: true
|
||||
function open(): void {
|
||||
baseDialog.isOpen = true;
|
||||
}
|
||||
function close(): void {
|
||||
baseDialog.isOpen = false;
|
||||
}
|
||||
function setText(text: string): void {
|
||||
baseDialog.text = text.replace("\\n", "\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user