mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Settings: automation
This commit is contained in:
@@ -17,28 +17,31 @@ ColumnLayout {
|
||||
onToggled: checked => Settings.data.wallpaper.randomEnabled = checked
|
||||
}
|
||||
|
||||
NComboBox {
|
||||
visible: Settings.data.wallpaper.randomEnabled
|
||||
label: I18n.tr("settings.wallpaper.automation.change-mode.label")
|
||||
description: I18n.tr("settings.wallpaper.automation.change-mode.description")
|
||||
Layout.fillWidth: true
|
||||
model: [
|
||||
{
|
||||
"key": "random",
|
||||
"name": I18n.tr("settings.wallpaper.automation.change-mode.random")
|
||||
},
|
||||
{
|
||||
"key": "alphabetical",
|
||||
"name": I18n.tr("settings.wallpaper.automation.change-mode.alphabetical")
|
||||
}
|
||||
]
|
||||
currentKey: Settings.data.wallpaper.wallpaperChangeMode || "random"
|
||||
onSelected: key => Settings.data.wallpaper.wallpaperChangeMode = key
|
||||
defaultValue: Settings.getDefaultValue("wallpaper.transitionType")
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
visible: Settings.data.wallpaper.randomEnabled
|
||||
enabled: Settings.data.wallpaper.randomEnabled
|
||||
spacing: Style.marginL
|
||||
Layout.fillWidth: true
|
||||
|
||||
NComboBox {
|
||||
|
||||
label: I18n.tr("settings.wallpaper.automation.change-mode.label")
|
||||
description: I18n.tr("settings.wallpaper.automation.change-mode.description")
|
||||
Layout.fillWidth: true
|
||||
model: [
|
||||
{
|
||||
"key": "random",
|
||||
"name": I18n.tr("settings.wallpaper.automation.change-mode.random")
|
||||
},
|
||||
{
|
||||
"key": "alphabetical",
|
||||
"name": I18n.tr("settings.wallpaper.automation.change-mode.alphabetical")
|
||||
}
|
||||
]
|
||||
currentKey: Settings.data.wallpaper.wallpaperChangeMode || "random"
|
||||
onSelected: key => Settings.data.wallpaper.wallpaperChangeMode = key
|
||||
defaultValue: Settings.getDefaultValue("wallpaper.transitionType")
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
NLabel {
|
||||
label: I18n.tr("settings.wallpaper.automation.interval.label")
|
||||
@@ -55,6 +58,7 @@ ColumnLayout {
|
||||
RowLayout {
|
||||
id: presetRow
|
||||
spacing: Style.marginS
|
||||
opacity: enabled ? 1.0 : 0.6
|
||||
|
||||
property var intervalPresets: [5 * 60, 10 * 60, 15 * 60, 30 * 60, 45 * 60, 60 * 60, 90 * 60, 120 * 60]
|
||||
property bool isCurrentPreset: {
|
||||
@@ -91,8 +95,10 @@ ColumnLayout {
|
||||
|
||||
RowLayout {
|
||||
id: customRow
|
||||
|
||||
visible: presetRow.customForcedVisible || !presetRow.isCurrentPreset
|
||||
spacing: Style.marginS
|
||||
opacity: enabled ? 1.0 : 0.6
|
||||
Layout.topMargin: Style.marginS
|
||||
|
||||
NTextInput {
|
||||
|
||||
Reference in New Issue
Block a user