mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Merge pull request #1120 from damian-ds7/hide-notification-icon-when-zero
NotificationsHistory: replace hide badge when zero with hide icon when zero
This commit is contained in:
@@ -279,9 +279,9 @@
|
||||
}
|
||||
},
|
||||
"notification-history": {
|
||||
"hide-badge-when-zero": {
|
||||
"description": "Benachrichtigungs-Badge ausblenden, wenn keine ungelesenen Benachrichtigungen vorhanden sind.",
|
||||
"label": "Badge ausblenden, wenn null"
|
||||
"hide-widget-when-zero": {
|
||||
"description": "Benachrichtigungssymbol ausblenden, wenn keine ungelesenen Benachrichtigungen vorhanden sind.",
|
||||
"label": "Symbol ausblenden, wenn null"
|
||||
},
|
||||
"show-unread-badge": {
|
||||
"description": "Badge mit der Anzahl ungelesener Benachrichtigungen anzeigen.",
|
||||
|
||||
@@ -279,9 +279,9 @@
|
||||
}
|
||||
},
|
||||
"notification-history": {
|
||||
"hide-badge-when-zero": {
|
||||
"description": "Hide the notification badge when there are no unread notifications.",
|
||||
"label": "Hide badge when zero"
|
||||
"hide-widget-when-zero": {
|
||||
"description": "Hide the notification icon when there are no unread notifications.",
|
||||
"label": "Hide icon when zero"
|
||||
},
|
||||
"show-unread-badge": {
|
||||
"description": "Display a badge showing the number of unread notifications.",
|
||||
|
||||
@@ -279,9 +279,9 @@
|
||||
}
|
||||
},
|
||||
"notification-history": {
|
||||
"hide-badge-when-zero": {
|
||||
"description": "Ocultar la insignia de notificaciones cuando no hay notificaciones no leídas.",
|
||||
"label": "Ocultar insignia cuando es cero"
|
||||
"hide-widget-when-zero": {
|
||||
"description": "Ocultar el icono de notificaciones cuando no hay notificaciones no leídas.",
|
||||
"label": "Ocultar icono cuando es cero"
|
||||
},
|
||||
"show-unread-badge": {
|
||||
"description": "Mostrar una insignia con el número de notificaciones no leídas.",
|
||||
|
||||
@@ -279,9 +279,9 @@
|
||||
}
|
||||
},
|
||||
"notification-history": {
|
||||
"hide-badge-when-zero": {
|
||||
"description": "Masquer le badge de notification quand il n'y a pas de notifications non lues.",
|
||||
"label": "Masquer le badge quand zéro"
|
||||
"hide-widget-when-zero": {
|
||||
"description": "Masquer l'icône de notification quand il n'y a pas de notifications non lues.",
|
||||
"label": "Masquer l'icône quand zéro"
|
||||
},
|
||||
"show-unread-badge": {
|
||||
"description": "Afficher un badge montrant le nombre de notifications non lues.",
|
||||
|
||||
@@ -279,9 +279,9 @@
|
||||
}
|
||||
},
|
||||
"notification-history": {
|
||||
"hide-badge-when-zero": {
|
||||
"description": "未読通知がない場合、通知バッジを非表示にします。",
|
||||
"label": "ゼロのときはバッジを隠す"
|
||||
"hide-widget-when-zero": {
|
||||
"description": "未読通知がない場合、通知アイコンを非表示にします。",
|
||||
"label": "ゼロのときはアイコンを隠す"
|
||||
},
|
||||
"show-unread-badge": {
|
||||
"description": "未読通知の数を表示するバッジを表示します。",
|
||||
|
||||
@@ -279,9 +279,9 @@
|
||||
}
|
||||
},
|
||||
"notification-history": {
|
||||
"hide-badge-when-zero": {
|
||||
"description": "Verberg de meldingsbadge wanneer er geen ongelezen meldingen zijn.",
|
||||
"label": "Badge verbergen bij nul"
|
||||
"hide-widget-when-zero": {
|
||||
"description": "Verberg het meldingspictogram wanneer er geen ongelezen meldingen zijn.",
|
||||
"label": "Pictogram verbergen bij nul"
|
||||
},
|
||||
"show-unread-badge": {
|
||||
"description": "Toon een badge met het aantal ongelezen meldingen.",
|
||||
|
||||
@@ -279,9 +279,9 @@
|
||||
}
|
||||
},
|
||||
"notification-history": {
|
||||
"hide-badge-when-zero": {
|
||||
"description": "Ocultar o distintivo de notificação quando não há notificações não lidas.",
|
||||
"label": "Ocultar distintivo quando zero"
|
||||
"hide-widget-when-zero": {
|
||||
"description": "Ocultar o ícone de notificação quando não há notificações não lidas.",
|
||||
"label": "Ocultar ícone quando zero"
|
||||
},
|
||||
"show-unread-badge": {
|
||||
"description": "Exibir um distintivo mostrando o número de notificações não lidas.",
|
||||
|
||||
@@ -279,7 +279,7 @@
|
||||
}
|
||||
},
|
||||
"notification-history": {
|
||||
"hide-badge-when-zero": {
|
||||
"hide-widget-when-zero": {
|
||||
"description": "Скрыть значок уведомлений, когда нет непрочитанных уведомлений.",
|
||||
"label": "Скрыть значок, если ноль"
|
||||
},
|
||||
|
||||
@@ -279,9 +279,9 @@
|
||||
}
|
||||
},
|
||||
"notification-history": {
|
||||
"hide-badge-when-zero": {
|
||||
"description": "Okunmamış bildirim olmadığında bildirim rozetini gizle.",
|
||||
"label": "Sıfırken rozeti gizle"
|
||||
"hide-widget-when-zero": {
|
||||
"description": "Okunmamış bildirim olmadığında bildirim simgesini gizle.",
|
||||
"label": "Sıfırken simgeyi gizle"
|
||||
},
|
||||
"show-unread-badge": {
|
||||
"description": "Okunmamış bildirim sayısını gösteren bir rozet göster.",
|
||||
|
||||
@@ -279,7 +279,7 @@
|
||||
}
|
||||
},
|
||||
"notification-history": {
|
||||
"hide-badge-when-zero": {
|
||||
"hide-widget-when-zero": {
|
||||
"description": "Приховувати значок сповіщень, коли немає непрочитаних сповіщень.",
|
||||
"label": "Приховувати значок при нулі"
|
||||
},
|
||||
|
||||
@@ -279,9 +279,9 @@
|
||||
}
|
||||
},
|
||||
"notification-history": {
|
||||
"hide-badge-when-zero": {
|
||||
"description": "当没有未读通知时隐藏通知徽章。",
|
||||
"label": "空时隐藏徽章"
|
||||
"hide-widget-when-zero": {
|
||||
"description": "当没有未读通知时隐藏通知图标。",
|
||||
"label": "空时隐藏图标"
|
||||
},
|
||||
"show-unread-badge": {
|
||||
"description": "显示一个用于展示未读通知数量的徽章。",
|
||||
|
||||
@@ -46,6 +46,8 @@ NIconButton {
|
||||
return count;
|
||||
}
|
||||
|
||||
readonly property int count: computeUnreadCount()
|
||||
|
||||
baseSize: Style.capsuleHeight
|
||||
applyUiScale: false
|
||||
density: Settings.data.bar.density
|
||||
@@ -59,6 +61,7 @@ NIconButton {
|
||||
colorBorderHover: Color.transparent
|
||||
border.color: Style.capsuleBorderColor
|
||||
border.width: Style.capsuleBorderWidth
|
||||
visible: count > 0 || !hideWhenZero
|
||||
|
||||
NPopupContextMenu {
|
||||
id: contextMenu
|
||||
@@ -116,17 +119,16 @@ NIconButton {
|
||||
anchors.rightMargin: 2
|
||||
anchors.topMargin: 1
|
||||
z: 2
|
||||
active: showUnreadBadge && (!hideWhenZero || computeUnreadCount() > 0)
|
||||
active: showUnreadBadge
|
||||
sourceComponent: Rectangle {
|
||||
id: badge
|
||||
readonly property int count: computeUnreadCount()
|
||||
height: 8
|
||||
width: height
|
||||
radius: Style.radiusXS
|
||||
color: Color.mError
|
||||
border.color: Color.mSurface
|
||||
border.width: Style.borderS
|
||||
visible: count > 0 || !hideWhenZero
|
||||
visible: count > 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,8 +31,8 @@ ColumnLayout {
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("bar.widget-settings.notification-history.hide-badge-when-zero.label")
|
||||
description: I18n.tr("bar.widget-settings.notification-history.hide-badge-when-zero.description")
|
||||
label: I18n.tr("bar.widget-settings.notification-history.hide-widget-when-zero.label")
|
||||
description: I18n.tr("bar.widget-settings.notification-history.hide-widget-when-zero.description")
|
||||
checked: valueHideWhenZero
|
||||
onToggled: checked => valueHideWhenZero = checked
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ Singleton {
|
||||
"NotificationHistory": {
|
||||
"allowUserSettings": true,
|
||||
"showUnreadBadge": true,
|
||||
"hideWhenZero": true
|
||||
"hideWhenZero": false
|
||||
},
|
||||
"SessionMenu": {
|
||||
"allowUserSettings": true,
|
||||
|
||||
Reference in New Issue
Block a user