mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
added reset button for notification timeout settings
This commit is contained in:
@@ -1378,6 +1378,7 @@
|
|||||||
"description": "Use the expire timeout set in the notification.",
|
"description": "Use the expire timeout set in the notification.",
|
||||||
"label": "Respect expire timeout"
|
"label": "Respect expire timeout"
|
||||||
},
|
},
|
||||||
|
"reset": "Reset timeout duration",
|
||||||
"section": {
|
"section": {
|
||||||
"description": "Configure how long notifications stay visible based on their urgency level.",
|
"description": "Configure how long notifications stay visible based on their urgency level.",
|
||||||
"label": "Notification duration"
|
"label": "Notification duration"
|
||||||
|
|||||||
@@ -137,6 +137,11 @@ ColumnLayout {
|
|||||||
description: I18n.tr("settings.notifications.duration.low-urgency.description")
|
description: I18n.tr("settings.notifications.duration.low-urgency.description")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
spacing: Style.marginL
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
|
||||||
NValueSlider {
|
NValueSlider {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
from: 1
|
from: 1
|
||||||
@@ -146,7 +151,22 @@ ColumnLayout {
|
|||||||
onMoved: value => Settings.data.notifications.lowUrgencyDuration = value
|
onMoved: value => Settings.data.notifications.lowUrgencyDuration = value
|
||||||
text: Settings.data.notifications.lowUrgencyDuration + "s"
|
text: Settings.data.notifications.lowUrgencyDuration + "s"
|
||||||
}
|
}
|
||||||
}
|
// Reset button container
|
||||||
|
Item {
|
||||||
|
Layout.preferredWidth: 30 * Style.uiScaleRatio
|
||||||
|
Layout.preferredHeight: 30 * Style.uiScaleRatio
|
||||||
|
|
||||||
|
NIconButton {
|
||||||
|
icon: "refresh"
|
||||||
|
baseSize: Style.baseWidgetSize * 0.8
|
||||||
|
tooltipText: I18n.tr("settings.notifications.duration.reset")
|
||||||
|
onClicked: Settings.data.notifications.lowUrgencyDuration = 3
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Normal Urgency Duration
|
// Normal Urgency Duration
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
@@ -158,6 +178,10 @@ ColumnLayout {
|
|||||||
description: I18n.tr("settings.notifications.duration.normal-urgency.description")
|
description: I18n.tr("settings.notifications.duration.normal-urgency.description")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
spacing: Style.marginL
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
NValueSlider {
|
NValueSlider {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
from: 1
|
from: 1
|
||||||
@@ -167,6 +191,22 @@ ColumnLayout {
|
|||||||
onMoved: value => Settings.data.notifications.normalUrgencyDuration = value
|
onMoved: value => Settings.data.notifications.normalUrgencyDuration = value
|
||||||
text: Settings.data.notifications.normalUrgencyDuration + "s"
|
text: Settings.data.notifications.normalUrgencyDuration + "s"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Reset button container
|
||||||
|
Item {
|
||||||
|
Layout.preferredWidth: 30 * Style.uiScaleRatio
|
||||||
|
Layout.preferredHeight: 30 * Style.uiScaleRatio
|
||||||
|
|
||||||
|
NIconButton {
|
||||||
|
icon: "refresh"
|
||||||
|
baseSize: Style.baseWidgetSize * 0.8
|
||||||
|
tooltipText: I18n.tr("settings.notifications.duration.reset")
|
||||||
|
onClicked: Settings.data.notifications.normalUrgencyDuration = 8
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Critical Urgency Duration
|
// Critical Urgency Duration
|
||||||
@@ -179,6 +219,10 @@ ColumnLayout {
|
|||||||
description: I18n.tr("settings.notifications.duration.critical-urgency.description")
|
description: I18n.tr("settings.notifications.duration.critical-urgency.description")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
spacing: Style.marginL
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
NValueSlider {
|
NValueSlider {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
from: 1
|
from: 1
|
||||||
@@ -188,8 +232,23 @@ ColumnLayout {
|
|||||||
onMoved: value => Settings.data.notifications.criticalUrgencyDuration = value
|
onMoved: value => Settings.data.notifications.criticalUrgencyDuration = value
|
||||||
text: Settings.data.notifications.criticalUrgencyDuration + "s"
|
text: Settings.data.notifications.criticalUrgencyDuration + "s"
|
||||||
}
|
}
|
||||||
}
|
// Reset button container
|
||||||
|
Item {
|
||||||
|
Layout.preferredWidth: 30 * Style.uiScaleRatio
|
||||||
|
Layout.preferredHeight: 30 * Style.uiScaleRatio
|
||||||
|
|
||||||
|
NIconButton {
|
||||||
|
icon: "refresh"
|
||||||
|
baseSize: Style.baseWidgetSize * 0.8
|
||||||
|
tooltipText: I18n.tr("settings.notifications.duration.reset")
|
||||||
|
onClicked: Settings.data.notifications.criticalUrgencyDuration = 15
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
NDivider {
|
NDivider {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: Style.marginL
|
Layout.topMargin: Style.marginL
|
||||||
|
|||||||
Reference in New Issue
Block a user