Files
quickshell-config/bar/NotificationIcon.qml

37 lines
919 B
QML

import qs.common
import qs.common.widgets
import QtQuick
import QtQuick.Layouts
Item {
id: root
height: parent.height
implicitWidth: rowLayout.implicitWidth
RowLayout {
id: rowLayout
anchors.fill: parent
//spacing: 15
StyledText {
Layout.alignment: Qt.AlignVCenter
font.pixelSize: Appearance.font.pixelSize.larger
color: Appearance.m3colors.m3error
text: "" + NotificationServer.amountNotifications
visible: {
NotificationServer.amountNotifications > 0
}
}
MaterialSymbol {
Layout.alignment: Qt.AlignVCenter
visible: true
fill: 1
text: NotificationServer.amountNotifications > 0 ? "notifications_unread" : "notifications"
iconSize: Appearance.font.pixelSize.larger
color: NotificationServer.amountNotifications > 0 ? Appearance.m3colors.m3error : Appearance.m3colors.m3onSecondaryContainer
}
}
}