add option to show/hide unread notif count

This commit is contained in:
end-4
2025-10-12 10:23:34 +02:00
parent 3b689f8a66
commit 3ffc25d5d8
2 changed files with 16 additions and 3 deletions
@@ -305,17 +305,25 @@ Item { // Bar content region
animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)
}
Rectangle {
id: notifPing
visible: !Notifications.silent && Notifications.unread > 0
anchors.right: parent.right
property bool showUnreadCount: Config.options.bar.indicators.notifications.showUnreadCount
anchors {
right: parent.right
top: parent.top
rightMargin: showUnreadCount ? 0 : 1
topMargin: showUnreadCount ? 0 : 3
}
radius: Appearance.rounding.full
color: Appearance.colors.colOnLayer0
z: 1
implicitHeight: Math.max(notificationCounterText.implicitWidth, notificationCounterText.implicitHeight)
implicitWidth: Math.max(notificationCounterText.implicitWidth, notificationCounterText.implicitHeight)
implicitHeight: showUnreadCount ? Math.max(notificationCounterText.implicitWidth, notificationCounterText.implicitHeight) : 8
implicitWidth: implicitHeight
StyledText {
id: notificationCounterText
visible: notifPing.showUnreadCount
anchors.centerIn: parent
font.pixelSize: Appearance.font.pixelSize.smallest
color: Appearance.colors.colLayer0
@@ -198,6 +198,11 @@ Singleton {
property bool useUSCS: false // Instead of metric (SI) units
property int fetchInterval: 10 // minutes
}
property JsonObject indicators: JsonObject {
property JsonObject notifications: JsonObject {
property bool showUnreadCount: false
}
}
}
property JsonObject battery: JsonObject {