feat: add NotificationButton widget to bar to display notifications and work NotificationButton to a usable state

This commit is contained in:
Hannes
2026-08-27 21:50:50 +02:00
parent 3cd6807681
commit f2e8d8a144
6 changed files with 230 additions and 34 deletions
+1
View File
@@ -73,6 +73,7 @@ PanelWindow {
// TODO: Add bluetooth, network, audio, power, maybe HW monitor
Tray{}
NotificationButton {}
// AudioSource{}
AudioSink{}
Battery{}
@@ -0,0 +1,41 @@
import QtQuick
import Quickshell
import Quickshell.Widgets
import Quickshell.Io
import "../../notification/notificationServer/"
import "../../../config"
MouseArea {
id: notificationButton
width: Math.max(bar.height, notificationText.width + Config.spacing)
height: bar.height
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: {
menuProc.running = true
}
Rectangle {
anchors.fill: parent
color: "transparent"
radius: Config.radius_fun(notificationButton.height)
Text {
id: notificationText
anchors.centerIn: parent
text: Quickshell.iconPath("discord")
// text: "󰂚"
font.pixelSize: Config.bigIconSize(notificationButton.height)
font.family: Config.font
color: Colors.secondaryContainer_fg
}
Image{
id: iconImage
source: Quickshell.iconPath("discord")
width: Config.bigIconSize(notificationButton.height)
height: Config.bigIconSize(notificationButton.height)
}
}
}