diff --git a/Assets/Translations/en.json b/Assets/Translations/en.json index c70a0c94..cb9bc55a 100644 --- a/Assets/Translations/en.json +++ b/Assets/Translations/en.json @@ -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" diff --git a/Modules/Panels/Settings/Tabs/NotificationsTab.qml b/Modules/Panels/Settings/Tabs/NotificationsTab.qml index bc01d466..d4fd6e9e 100644 --- a/Modules/Panels/Settings/Tabs/NotificationsTab.qml +++ b/Modules/Panels/Settings/Tabs/NotificationsTab.qml @@ -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 diff --git a/Modules/Panels/Settings/Tabs/UserInterfaceTab.qml b/Modules/Panels/Settings/Tabs/UserInterfaceTab.qml index abe077e4..cd6ad4c8 100644 --- a/Modules/Panels/Settings/Tabs/UserInterfaceTab.qml +++ b/Modules/Panels/Settings/Tabs/UserInterfaceTab.qml @@ -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