From 9f8bf988f044757ac8ac44739ea13b659a457e7a Mon Sep 17 00:00:00 2001 From: Lysec Date: Wed, 18 Mar 2026 17:50:46 +0100 Subject: [PATCH] fix(ntextinput): use onTextChanged for autosave, onEditingFinished instead of onAccepted - Switch most settings from onEditingFinished to onTextChanged so changes save on every keystroke - Replace onAccepted with onEditingFinished (Enter + blur) for search, pager, wifi, bluetooth - Keep onEditingFinished for pager, wallhaven, path inputs, and validation fields --- .../WidgetSettings/ActiveWindowSettings.qml | 2 +- .../AudioVisualizerSettings.qml | 2 +- .../Bar/WidgetSettings/ClockSettings.qml | 18 +++++++---- .../WidgetSettings/CustomButtonSettings.qml | 30 +++++++++++-------- .../Bar/WidgetSettings/MediaMiniSettings.qml | 2 +- .../Bar/WidgetSettings/MicrophoneSettings.qml | 6 ++-- .../Bar/WidgetSettings/SpacerSettings.qml | 2 +- .../Bar/WidgetSettings/TaskbarSettings.qml | 2 +- .../Bar/WidgetSettings/VolumeSettings.qml | 6 ++-- .../WidgetSettings/CustomButtonSettings.qml | 10 +++---- .../WidgetSettings/ClockSettings.qml | 6 ++-- Modules/Panels/Settings/SettingsContent.qml | 2 +- .../Settings/Tabs/Audio/VolumesSubTab.qml | 2 +- .../Tabs/Connections/BluetoothSubTab.qml | 2 +- .../Settings/Tabs/Connections/WifiSubTab.qml | 10 +++---- .../Settings/Tabs/General/BasicsSubTab.qml | 2 +- .../Tabs/Launcher/ClipboardSubTab.qml | 4 +-- .../Settings/Tabs/Launcher/ExecuteSubTab.qml | 6 ++-- .../Tabs/Notifications/SoundSubTab.qml | 10 +++---- .../Settings/Tabs/Wallpaper/GeneralSubTab.qml | 4 +-- .../Panels/SetupWizard/SetupWallpaperStep.qml | 2 +- Modules/Panels/Wallpaper/WallpaperPanel.qml | 2 +- Widgets/NInputAction.qml | 6 ++-- 23 files changed, 76 insertions(+), 62 deletions(-) diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/ActiveWindowSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/ActiveWindowSettings.qml index b1fed1cdc..7fbecd6dd 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/ActiveWindowSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/ActiveWindowSettings.qml @@ -110,7 +110,7 @@ ColumnLayout { description: I18n.tr("bar.media-mini.max-width-description") placeholderText: widgetMetadata.maxWidth text: valueMaxWidth - onEditingFinished: saveSettings() + onTextChanged: saveSettings() defaultValue: String(widgetMetadata.maxWidth) } diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/AudioVisualizerSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/AudioVisualizerSettings.qml index ca474a1c3..499db6a52 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/AudioVisualizerSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/AudioVisualizerSettings.qml @@ -34,7 +34,7 @@ ColumnLayout { description: I18n.tr("bar.audio-visualizer.width-description") text: widgetData.width || widgetMetadata.width placeholderText: I18n.tr("placeholders.enter-width-pixels") - onEditingFinished: saveSettings() + onTextChanged: saveSettings() defaultValue: String(widgetMetadata.width) } diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/ClockSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/ClockSettings.qml index 5ff3f715c..e403ce84e 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/ClockSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/ClockSettings.qml @@ -140,8 +140,10 @@ ColumnLayout { description: I18n.tr("bar.clock.horizontal-bar-description") placeholderText: "HH:mm ddd, MMM dd" text: valueFormatHorizontal - onTextChanged: valueFormatHorizontal = text - onEditingFinished: saveSettings() + onTextChanged: { + valueFormatHorizontal = text + saveSettings() + } Component.onCompleted: { if (inputItem) { inputItem.onActiveFocusChanged.connect(function () { @@ -166,8 +168,10 @@ ColumnLayout { // Tokens are Qt format tokens and must not be localized placeholderText: "HH mm dd MM" text: valueFormatVertical - onTextChanged: valueFormatVertical = text - onEditingFinished: saveSettings() + onTextChanged: { + valueFormatVertical = text + saveSettings() + } Component.onCompleted: { if (inputItem) { inputItem.onActiveFocusChanged.connect(function () { @@ -187,8 +191,10 @@ ColumnLayout { description: I18n.tr("bar.clock.tooltip-format-description") placeholderText: "HH:mm, ddd MMM dd" text: valueTooltipFormat - onTextChanged: valueTooltipFormat = text - onEditingFinished: saveSettings() + onTextChanged: { + valueTooltipFormat = text + saveSettings() + } Component.onCompleted: { if (inputItem) { inputItem.onActiveFocusChanged.connect(function () { diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/CustomButtonSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/CustomButtonSettings.qml index da099e41b..0ef12423c 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/CustomButtonSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/CustomButtonSettings.qml @@ -139,8 +139,10 @@ ColumnLayout { description: I18n.tr("bar.custom-button.general-tooltip-text-description") placeholderText: I18n.tr("placeholders.enter-tooltip") text: valueGeneralTooltipText - onTextChanged: valueGeneralTooltipText = text - onEditingFinished: saveSettings() + onTextChanged: { + valueGeneralTooltipText = text + saveSettings() + } defaultValue: widgetMetadata.generalTooltipText } @@ -174,8 +176,10 @@ ColumnLayout { description: I18n.tr("bar.custom-button.ipc-identifier-description") placeholderText: I18n.tr("placeholders.enter-ipc-identifier") text: valueIpcIdentifier - onTextChanged: valueIpcIdentifier = text - onEditingFinished: saveSettings() + onTextChanged: { + valueIpcIdentifier = text + saveSettings() + } defaultValue: widgetMetadata.ipcIdentifier } @@ -189,7 +193,7 @@ ColumnLayout { description: I18n.tr("bar.custom-button.left-click-description") placeholderText: I18n.tr("placeholders.enter-command") text: widgetData?.leftClickExec || widgetMetadata.leftClickExec - onEditingFinished: saveSettings() + onTextChanged: saveSettings() defaultValue: widgetMetadata.leftClickExec } @@ -219,7 +223,7 @@ ColumnLayout { description: I18n.tr("bar.custom-button.right-click-description") placeholderText: I18n.tr("placeholders.enter-command") text: widgetData?.rightClickExec || widgetMetadata.rightClickExec - onEditingFinished: saveSettings() + onTextChanged: saveSettings() defaultValue: widgetMetadata.rightClickExec } @@ -249,7 +253,7 @@ ColumnLayout { description: I18n.tr("bar.custom-button.middle-click-description") placeholderText: I18n.tr("placeholders.enter-command") text: widgetData.middleClickExec || widgetMetadata.middleClickExec - onEditingFinished: saveSettings() + onTextChanged: saveSettings() defaultValue: widgetMetadata.middleClickExec } @@ -299,7 +303,7 @@ ColumnLayout { description: I18n.tr("bar.custom-button.wheel-description") placeholderText: I18n.tr("placeholders.enter-command") text: widgetData?.wheelExec || widgetMetadata?.wheelExec - onEditingFinished: saveSettings() + onTextChanged: saveSettings() defaultValue: widgetMetadata.wheelExec } @@ -334,7 +338,7 @@ ColumnLayout { description: I18n.tr("bar.custom-button.wheel-up-description") placeholderText: I18n.tr("placeholders.enter-command") text: widgetData?.wheelUpExec || widgetMetadata?.wheelUpExec - onEditingFinished: saveSettings() + onTextChanged: saveSettings() defaultValue: widgetMetadata.wheelUpExec } @@ -364,7 +368,7 @@ ColumnLayout { description: I18n.tr("bar.custom-button.wheel-down-description") placeholderText: I18n.tr("placeholders.enter-command") text: widgetData?.wheelDownExec || widgetMetadata?.wheelDownExec - onEditingFinished: saveSettings() + onTextChanged: saveSettings() defaultValue: widgetMetadata.wheelDownExec } @@ -451,7 +455,7 @@ ColumnLayout { description: valueTextStream ? I18n.tr("bar.custom-button.display-command-output-stream-description") : I18n.tr("bar.custom-button.display-command-output-description") placeholderText: I18n.tr("placeholders.command-example") text: widgetData?.textCommand || widgetMetadata.textCommand - onEditingFinished: saveSettings() + onTextChanged: saveSettings() defaultValue: widgetMetadata.textCommand } @@ -463,7 +467,7 @@ ColumnLayout { description: I18n.tr("bar.custom-button.collapse-condition-description") placeholderText: I18n.tr("placeholders.enter-text-to-collapse") text: widgetData?.textCollapse || widgetMetadata.textCollapse - onEditingFinished: saveSettings() + onTextChanged: saveSettings() defaultValue: widgetMetadata.textCollapse } @@ -475,7 +479,7 @@ ColumnLayout { description: I18n.tr("bar.custom-button.refresh-interval-description") placeholderText: String(widgetMetadata.textIntervalMs) text: widgetData && widgetData.textIntervalMs !== undefined ? String(widgetData.textIntervalMs) : "" - onEditingFinished: saveSettings() + onTextChanged: saveSettings() defaultValue: String(widgetMetadata.textIntervalMs) } diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/MediaMiniSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/MediaMiniSettings.qml index b9000b132..da2f7418a 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/MediaMiniSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/MediaMiniSettings.qml @@ -152,7 +152,7 @@ ColumnLayout { description: I18n.tr("bar.media-mini.max-width-description") placeholderText: widgetMetadata.maxWidth text: valueMaxWidth - onEditingFinished: saveSettings() + onTextChanged: saveSettings() defaultValue: String(widgetMetadata.maxWidth) } diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/MicrophoneSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/MicrophoneSettings.qml index fdc79ebda..a4e22839a 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/MicrophoneSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/MicrophoneSettings.qml @@ -81,8 +81,10 @@ ColumnLayout { description: I18n.tr("panels.audio.on-middle-clicked-description") placeholderText: I18n.tr("panels.audio.external-mixer-placeholder") text: valueMiddleClickCommand - onTextChanged: valueMiddleClickCommand = text - onEditingFinished: saveSettings() + onTextChanged: { + valueMiddleClickCommand = text + saveSettings() + } defaultValue: widgetMetadata.middleClickCommand } } diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/SpacerSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/SpacerSettings.qml index 8909d12e3..818f74f8a 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/SpacerSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/SpacerSettings.qml @@ -28,7 +28,7 @@ ColumnLayout { description: I18n.tr("bar.spacer.width-description") text: widgetData.width || widgetMetadata.width placeholderText: I18n.tr("placeholders.enter-width-pixels") - onEditingFinished: saveSettings() + onTextChanged: saveSettings() defaultValue: String(widgetMetadata.width) } } diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/TaskbarSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/TaskbarSettings.qml index 8d3b81594..2628e59eb 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/TaskbarSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/TaskbarSettings.qml @@ -164,7 +164,7 @@ ColumnLayout { description: I18n.tr("bar.taskbar.title-width-description") text: widgetData.titleWidth || widgetMetadata.titleWidth placeholderText: I18n.tr("placeholders.enter-width-pixels") - onEditingFinished: saveSettings() + onTextChanged: saveSettings() defaultValue: String(widgetMetadata.titleWidth) } diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/VolumeSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/VolumeSettings.qml index fdc79ebda..a4e22839a 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/VolumeSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/VolumeSettings.qml @@ -81,8 +81,10 @@ ColumnLayout { description: I18n.tr("panels.audio.on-middle-clicked-description") placeholderText: I18n.tr("panels.audio.external-mixer-placeholder") text: valueMiddleClickCommand - onTextChanged: valueMiddleClickCommand = text - onEditingFinished: saveSettings() + onTextChanged: { + valueMiddleClickCommand = text + saveSettings() + } defaultValue: widgetMetadata.middleClickCommand } } diff --git a/Modules/Panels/Settings/ControlCenter/WidgetSettings/CustomButtonSettings.qml b/Modules/Panels/Settings/ControlCenter/WidgetSettings/CustomButtonSettings.qml index df0641732..d27e285e1 100644 --- a/Modules/Panels/Settings/ControlCenter/WidgetSettings/CustomButtonSettings.qml +++ b/Modules/Panels/Settings/ControlCenter/WidgetSettings/CustomButtonSettings.qml @@ -139,7 +139,7 @@ ColumnLayout { description: I18n.tr("bar.custom-button.general-tooltip-text-description") placeholderText: I18n.tr("placeholders.enter-tooltip") text: _settings.generalTooltipText - onEditingFinished: { + onTextChanged: { _settings.generalTooltipText = text; saveSettings(); } @@ -164,7 +164,7 @@ ColumnLayout { description: I18n.tr("bar.custom-button.left-click-description") placeholderText: I18n.tr("placeholders.enter-command") text: _settings.onClicked - onEditingFinished: { + onTextChanged: { _settings.onClicked = text; saveSettings(); } @@ -177,7 +177,7 @@ ColumnLayout { description: I18n.tr("bar.custom-button.right-click-description") placeholderText: I18n.tr("placeholders.enter-command") text: _settings.onRightClicked - onEditingFinished: { + onTextChanged: { _settings.onRightClicked = text; saveSettings(); } @@ -190,7 +190,7 @@ ColumnLayout { description: I18n.tr("bar.custom-button.middle-click-description") placeholderText: I18n.tr("placeholders.enter-command") text: _settings.onMiddleClicked - onEditingFinished: { + onTextChanged: { _settings.onMiddleClicked = text; saveSettings(); } @@ -238,7 +238,7 @@ ColumnLayout { Layout.fillWidth: true placeholderText: I18n.tr("panels.control-center.shortcuts-custom-button-state-checks-command") text: model.command - onEditingFinished: { + onTextChanged: { updateStateCheck(currentIndex, text, model.icon); } } diff --git a/Modules/Panels/Settings/DesktopWidgets/WidgetSettings/ClockSettings.qml b/Modules/Panels/Settings/DesktopWidgets/WidgetSettings/ClockSettings.qml index 3103ba839..7e2215f10 100644 --- a/Modules/Panels/Settings/DesktopWidgets/WidgetSettings/ClockSettings.qml +++ b/Modules/Panels/Settings/DesktopWidgets/WidgetSettings/ClockSettings.qml @@ -174,8 +174,10 @@ ColumnLayout { description: I18n.tr("bar.clock.horizontal-bar-description") placeholderText: "HH:mm\\nd MMMM yyyy" text: valueFormat - onTextChanged: valueFormat = text - onEditingFinished: settingsChanged(saveSettings()) + onTextChanged: { + valueFormat = text + settingsChanged(saveSettings()) + } Component.onCompleted: { if (inputItem) { inputItem.onActiveFocusChanged.connect(function () { diff --git a/Modules/Panels/Settings/SettingsContent.qml b/Modules/Panels/Settings/SettingsContent.qml index 601da5d43..6b4087bab 100644 --- a/Modules/Panels/Settings/SettingsContent.qml +++ b/Modules/Panels/Settings/SettingsContent.qml @@ -860,7 +860,7 @@ Item { } onTextChanged: root.searchText = text - onAccepted: { + onEditingFinished: { if (root.searchText.trim() !== "") root.searchActivate(); } diff --git a/Modules/Panels/Settings/Tabs/Audio/VolumesSubTab.qml b/Modules/Panels/Settings/Tabs/Audio/VolumesSubTab.qml index 38eddd9c0..ed0ef37fc 100644 --- a/Modules/Panels/Settings/Tabs/Audio/VolumesSubTab.qml +++ b/Modules/Panels/Settings/Tabs/Audio/VolumesSubTab.qml @@ -103,7 +103,7 @@ ColumnLayout { text: Settings.data.audio.volumeFeedbackSoundFile ?? "" buttonIcon: "folder-open" buttonTooltip: I18n.tr("panels.notifications.sounds-files-select-file") - onInputEditingFinished: Settings.data.audio.volumeFeedbackSoundFile = text + onInputTextChanged: text => Settings.data.audio.volumeFeedbackSoundFile = text onButtonClicked: volumeFeedbackFilePicker.open() } } diff --git a/Modules/Panels/Settings/Tabs/Connections/BluetoothSubTab.qml b/Modules/Panels/Settings/Tabs/Connections/BluetoothSubTab.qml index 6ecbfe79c..e9a604f74 100644 --- a/Modules/Panels/Settings/Tabs/Connections/BluetoothSubTab.qml +++ b/Modules/Panels/Settings/Tabs/Connections/BluetoothSubTab.qml @@ -754,7 +754,7 @@ Item { inputItem.forceActiveFocus(); } } - inputItem.onAccepted: { + inputItem.onEditingFinished: { if (text.length > 0) { BluetoothService.submitPin(text); text = ""; diff --git a/Modules/Panels/Settings/Tabs/Connections/WifiSubTab.qml b/Modules/Panels/Settings/Tabs/Connections/WifiSubTab.qml index bf1ade092..c617ac710 100644 --- a/Modules/Panels/Settings/Tabs/Connections/WifiSubTab.qml +++ b/Modules/Panels/Settings/Tabs/Connections/WifiSubTab.qml @@ -448,7 +448,7 @@ Item { label: I18n.tr("wifi.panel.network-name-ssid") text: addNetworkPopup.customSsid onTextChanged: addNetworkPopup.customSsid = text - onAccepted: { + onEditingFinished: { if (addNetworkPopup.customSsid.length > 0 && (addNetworkPopup.customSecurityKey === "open" || addNetworkPopup.customPassword.length > 0)) { NetworkService.connectManual(addNetworkPopup.customSsid, addNetworkPopup.customPassword, addNetworkPopup.customSecurityKey, addNetworkPopup.customIdentity, { eap: addNetworkPopup.customEnterpriseEap, @@ -572,7 +572,7 @@ Item { text: addNetworkPopup.customPassword onTextChanged: addNetworkPopup.customPassword = text inputItem.echoMode: addNetworkPopup.customShowPassword ? TextInput.Normal : TextInput.Password - onAccepted: { + onEditingFinished: { if (addNetworkPopup.customSsid.length > 0 && addNetworkPopup.customPassword.length > 0) { NetworkService.connectManual(addNetworkPopup.customSsid, addNetworkPopup.customPassword, addNetworkPopup.customSecurityKey, addNetworkPopup.customIdentity, { eap: addNetworkPopup.customEnterpriseEap, @@ -1278,7 +1278,7 @@ Item { selectByMouse: true text: root.enterpriseAnonIdentity onTextChanged: root.enterpriseAnonIdentity = text - onAccepted: identityInput.forceActiveFocus() + onEditingFinished: identityInput.forceActiveFocus() NText { visible: parent.text.length === 0 @@ -1315,7 +1315,7 @@ Item { forceActiveFocus(); } } - onAccepted: pwdInput.forceActiveFocus() + onEditingFinished: pwdInput.forceActiveFocus() NText { visible: parent.text.length === 0 @@ -1353,7 +1353,7 @@ Item { forceActiveFocus(); } } - onAccepted: { + onEditingFinished: { if (text && !NetworkService.connecting) { if (!networkItem.isEnterprise || identityInput.text.length > 0) { root.submitPassword(modelData.ssid, text, identityInput.text); diff --git a/Modules/Panels/Settings/Tabs/General/BasicsSubTab.qml b/Modules/Panels/Settings/Tabs/General/BasicsSubTab.qml index c1e8193b6..ce24b410f 100644 --- a/Modules/Panels/Settings/Tabs/General/BasicsSubTab.qml +++ b/Modules/Panels/Settings/Tabs/General/BasicsSubTab.qml @@ -42,7 +42,7 @@ ColumnLayout { placeholderText: '~/.face' // don't translate path buttonIcon: "photo" buttonTooltip: I18n.tr("panels.general.profile-tooltip") - onInputEditingFinished: Settings.data.general.avatarImage = text + onInputTextChanged: text => Settings.data.general.avatarImage = text onButtonClicked: { avatarPicker.openFilePicker(); } diff --git a/Modules/Panels/Settings/Tabs/Launcher/ClipboardSubTab.qml b/Modules/Panels/Settings/Tabs/Launcher/ClipboardSubTab.qml index 9b4ce492b..991ef0075 100644 --- a/Modules/Panels/Settings/Tabs/Launcher/ClipboardSubTab.qml +++ b/Modules/Panels/Settings/Tabs/Launcher/ClipboardSubTab.qml @@ -73,7 +73,7 @@ ColumnLayout { description: I18n.tr("panels.launcher.settings-clipboard-watch-text-description") Layout.fillWidth: true text: Settings.data.appLauncher.clipboardWatchTextCommand - onEditingFinished: Settings.data.appLauncher.clipboardWatchTextCommand = text + onTextChanged: Settings.data.appLauncher.clipboardWatchTextCommand = text enabled: Settings.data.appLauncher.enableClipboardHistory visible: Settings.data.appLauncher.enableClipboardHistory } @@ -83,7 +83,7 @@ ColumnLayout { description: I18n.tr("panels.launcher.settings-clipboard-watch-image-description") Layout.fillWidth: true text: Settings.data.appLauncher.clipboardWatchImageCommand - onEditingFinished: Settings.data.appLauncher.clipboardWatchImageCommand = text + onTextChanged: Settings.data.appLauncher.clipboardWatchImageCommand = text enabled: Settings.data.appLauncher.enableClipboardHistory visible: Settings.data.appLauncher.enableClipboardHistory } diff --git a/Modules/Panels/Settings/Tabs/Launcher/ExecuteSubTab.qml b/Modules/Panels/Settings/Tabs/Launcher/ExecuteSubTab.qml index 70ac9ade5..07fab76f1 100644 --- a/Modules/Panels/Settings/Tabs/Launcher/ExecuteSubTab.qml +++ b/Modules/Panels/Settings/Tabs/Launcher/ExecuteSubTab.qml @@ -15,7 +15,7 @@ ColumnLayout { description: I18n.tr("panels.launcher.settings-terminal-command-description") Layout.fillWidth: true text: Settings.data.appLauncher.terminalCommand - onEditingFinished: { + onTextChanged: { Settings.data.appLauncher.terminalCommand = text; } } @@ -35,7 +35,7 @@ ColumnLayout { text: Settings.data.appLauncher.customLaunchPrefix enabled: Settings.data.appLauncher.customLaunchPrefixEnabled visible: Settings.data.appLauncher.customLaunchPrefixEnabled - onEditingFinished: Settings.data.appLauncher.customLaunchPrefix = text + onTextChanged: Settings.data.appLauncher.customLaunchPrefix = text } NTextInput { @@ -44,6 +44,6 @@ ColumnLayout { Layout.fillWidth: true text: Settings.data.appLauncher.screenshotAnnotationTool placeholderText: I18n.tr("panels.launcher.settings-annotation-tool-placeholder") - onEditingFinished: Settings.data.appLauncher.screenshotAnnotationTool = text + onTextChanged: Settings.data.appLauncher.screenshotAnnotationTool = text } } diff --git a/Modules/Panels/Settings/Tabs/Notifications/SoundSubTab.qml b/Modules/Panels/Settings/Tabs/Notifications/SoundSubTab.qml index a1050c390..7875b22a5 100644 --- a/Modules/Panels/Settings/Tabs/Notifications/SoundSubTab.qml +++ b/Modules/Panels/Settings/Tabs/Notifications/SoundSubTab.qml @@ -99,7 +99,7 @@ ColumnLayout { text: Settings.data.notifications?.sounds?.normalSoundFile ?? "" buttonIcon: "folder-open" buttonTooltip: I18n.tr("panels.notifications.sounds-files-select-file") - onInputEditingFinished: { + onInputTextChanged: text => { const soundPath = text; Settings.data.notifications.sounds.normalSoundFile = soundPath; Settings.data.notifications.sounds.lowSoundFile = soundPath; @@ -132,7 +132,7 @@ ColumnLayout { text: Settings.data.notifications?.sounds?.lowSoundFile ?? "" buttonIcon: "folder-open" buttonTooltip: I18n.tr("panels.notifications.sounds-files-select-file") - onInputEditingFinished: Settings.data.notifications.sounds.lowSoundFile = text + onInputTextChanged: text => Settings.data.notifications.sounds.lowSoundFile = text onButtonClicked: root.openLowPicker() } } @@ -154,7 +154,7 @@ ColumnLayout { text: Settings.data.notifications?.sounds?.normalSoundFile ?? "" buttonIcon: "folder-open" buttonTooltip: I18n.tr("panels.notifications.sounds-files-select-file") - onInputEditingFinished: Settings.data.notifications.sounds.normalSoundFile = text + onInputTextChanged: text => Settings.data.notifications.sounds.normalSoundFile = text onButtonClicked: root.openNormalPicker() } } @@ -176,7 +176,7 @@ ColumnLayout { text: Settings.data.notifications?.sounds?.criticalSoundFile ?? "" buttonIcon: "folder-open" buttonTooltip: I18n.tr("panels.notifications.sounds-files-select-file") - onInputEditingFinished: Settings.data.notifications.sounds.criticalSoundFile = text + onInputTextChanged: text => Settings.data.notifications.sounds.criticalSoundFile = text onButtonClicked: root.openCriticalPicker() } } @@ -198,7 +198,7 @@ ColumnLayout { Layout.fillWidth: true placeholderText: I18n.tr("panels.notifications.sounds-excluded-apps-placeholder") text: Settings.data.notifications?.sounds?.excludedApps ?? "" - onEditingFinished: Settings.data.notifications.sounds.excludedApps = text + onTextChanged: Settings.data.notifications.sounds.excludedApps = text } } } diff --git a/Modules/Panels/Settings/Tabs/Wallpaper/GeneralSubTab.qml b/Modules/Panels/Settings/Tabs/Wallpaper/GeneralSubTab.qml index e7a55d171..cbbd05112 100644 --- a/Modules/Panels/Settings/Tabs/Wallpaper/GeneralSubTab.qml +++ b/Modules/Panels/Settings/Tabs/Wallpaper/GeneralSubTab.qml @@ -119,7 +119,7 @@ ColumnLayout { buttonIcon: "folder-open" buttonTooltip: I18n.tr("panels.wallpaper.settings-folder-label") Layout.fillWidth: true - onInputEditingFinished: Settings.data.wallpaper.directory = text + onInputTextChanged: text => Settings.data.wallpaper.directory = text onButtonClicked: root.openMainFolderPicker() } @@ -164,7 +164,7 @@ ColumnLayout { buttonIcon: "folder-open" buttonTooltip: I18n.tr("panels.wallpaper.settings-monitor-specific-tooltip") Layout.fillWidth: true - onInputEditingFinished: WallpaperService.setMonitorDirectory(modelData.name, text) + onInputTextChanged: text => WallpaperService.setMonitorDirectory(modelData.name, text) onButtonClicked: root.openMonitorFolderPicker(modelData.name) } } diff --git a/Modules/Panels/SetupWizard/SetupWallpaperStep.qml b/Modules/Panels/SetupWizard/SetupWallpaperStep.qml index 8df6886ec..355e0ddb9 100644 --- a/Modules/Panels/SetupWizard/SetupWallpaperStep.qml +++ b/Modules/Panels/SetupWizard/SetupWallpaperStep.qml @@ -332,7 +332,7 @@ ColumnLayout { buttonIcon: "folder-open" buttonTooltip: I18n.tr("setup.wallpaper.dir-browse") Layout.fillWidth: true - onInputEditingFinished: { + onInputTextChanged: text => { selectedDirectory = text; directoryChanged(text); } diff --git a/Modules/Panels/Wallpaper/WallpaperPanel.qml b/Modules/Panels/Wallpaper/WallpaperPanel.qml index 1e461312c..529999db9 100644 --- a/Modules/Panels/Wallpaper/WallpaperPanel.qml +++ b/Modules/Panels/Wallpaper/WallpaperPanel.qml @@ -1835,7 +1835,7 @@ SmartPanel { pageInput.inputItem.focus = false; } - onAccepted: submitPage() + onEditingFinished: submitPage() } NText { diff --git a/Widgets/NInputAction.qml b/Widgets/NInputAction.qml index 549b67269..53025ed49 100644 --- a/Widgets/NInputAction.qml +++ b/Widgets/NInputAction.qml @@ -29,10 +29,8 @@ RowLayout { description: root.description placeholderText: root.placeholderText text: root.text - onEditingFinished: { - root.text = text; - root.editingFinished(); - } + onTextChanged: root.text = text + onEditingFinished: root.editingFinished() Layout.fillWidth: true }