mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Merge pull request #722 from Sridou/dev
Reset button for notification timeout values
This commit is contained in:
@@ -1378,6 +1378,7 @@
|
||||
"description": "Use the expire timeout set in the notification.",
|
||||
"label": "Respect expire timeout"
|
||||
},
|
||||
"reset": "Reset timeout duration",
|
||||
"section": {
|
||||
"description": "Configure how long notifications stay visible based on their urgency level.",
|
||||
"label": "Notification duration"
|
||||
|
||||
@@ -137,6 +137,11 @@ ColumnLayout {
|
||||
description: I18n.tr("settings.notifications.duration.low-urgency.description")
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
spacing: Style.marginL
|
||||
Layout.fillWidth: true
|
||||
|
||||
|
||||
NValueSlider {
|
||||
Layout.fillWidth: true
|
||||
from: 1
|
||||
@@ -146,7 +151,22 @@ ColumnLayout {
|
||||
onMoved: value => Settings.data.notifications.lowUrgencyDuration = value
|
||||
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
|
||||
ColumnLayout {
|
||||
@@ -158,6 +178,10 @@ ColumnLayout {
|
||||
description: I18n.tr("settings.notifications.duration.normal-urgency.description")
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
spacing: Style.marginL
|
||||
Layout.fillWidth: true
|
||||
|
||||
NValueSlider {
|
||||
Layout.fillWidth: true
|
||||
from: 1
|
||||
@@ -167,6 +191,22 @@ ColumnLayout {
|
||||
onMoved: value => Settings.data.notifications.normalUrgencyDuration = value
|
||||
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
|
||||
@@ -179,6 +219,10 @@ ColumnLayout {
|
||||
description: I18n.tr("settings.notifications.duration.critical-urgency.description")
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
spacing: Style.marginL
|
||||
Layout.fillWidth: true
|
||||
|
||||
NValueSlider {
|
||||
Layout.fillWidth: true
|
||||
from: 1
|
||||
@@ -188,8 +232,23 @@ ColumnLayout {
|
||||
onMoved: value => Settings.data.notifications.criticalUrgencyDuration = value
|
||||
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 {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: Style.marginL
|
||||
|
||||
@@ -125,6 +125,7 @@ ColumnLayout {
|
||||
Layout.bottomMargin: Style.marginL
|
||||
}
|
||||
|
||||
// User Interface
|
||||
ColumnLayout {
|
||||
spacing: Style.marginXXS
|
||||
Layout.fillWidth: true
|
||||
@@ -165,6 +166,7 @@ ColumnLayout {
|
||||
}
|
||||
}
|
||||
|
||||
// Border Radius
|
||||
ColumnLayout {
|
||||
spacing: Style.marginXXS
|
||||
Layout.fillWidth: true
|
||||
|
||||
Reference in New Issue
Block a user