Notifications WIP

This commit is contained in:
Amaro Lopes
2025-10-07 17:11:20 -03:00
parent c66d043ece
commit d9406f2a90
9 changed files with 326 additions and 79 deletions

View File

@@ -1,11 +1,16 @@
import QtQuick
import Quickshell
import Quickshell.Widgets
import qs.Services
import qs.Common
import qs.Widgets
import Quickshell.Services.Notifications
Item {
id: root
property var monitor: ""
property bool createWindow: false
MarginWrapperManager {
rightMargin: Theme.gaps
@@ -15,26 +20,37 @@ Item {
Rectangle {
color: Theme.backgroudColor
implicitWidth: clockText.implicitWidth * 1.6
implicitHeight: Theme.heightGaps
implicitHeight: Theme.heightGaps
radius: 25
Text {
id: clockText
anchors.centerIn: parent
text: "OPA!"
text: {
NotificationService.notificationsNumber > 0 ? "\udb80\udc9a "+NotificationService.notificationsNumber : "\ueaa2";
}
font.bold: true
font.pixelSize: Theme.pixelSize
font.family: Theme.fontFamily
color: Theme.textColor
}
MouseArea{
MouseArea {
anchors.fill: parent
onClicked: {
console.log(Notifications.tracked)
console.log(NotificationService.currentNotification.image);
root.createWindow = true
}
}
}
LazyLoader {
id: windowLoader
active: root.createWindow
component: NotificationWindow {
anchor.item:root
}
}
}