mirror of
https://github.com/tomasriveral/nixos.git
synced 2026-08-12 10:30:44 +02:00
worked on QML and other minor details
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
pragma Singleton
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import "." as Notifs
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
property bool isOpen: false
|
||||
|
||||
IpcHandler {
|
||||
target: "notifications"
|
||||
|
||||
function open() {
|
||||
root.isOpen = true
|
||||
}
|
||||
|
||||
function close() {
|
||||
root.isOpen = false
|
||||
}
|
||||
|
||||
function toggle() {
|
||||
root.isOpen = !root.isOpen
|
||||
}
|
||||
}
|
||||
|
||||
LazyLoader {
|
||||
id: loader
|
||||
active: root.isOpen
|
||||
Notifs.NotificationCenterView {
|
||||
id: notificationCenter
|
||||
anchors.centerIn: parent
|
||||
width: 1000
|
||||
height: 800
|
||||
visible: true
|
||||
}
|
||||
}
|
||||
|
||||
function init() {
|
||||
// Empty init function to ensure singleton is loaded
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user