From 409b90504514d6c4d335f04b03e131273c7e4174 Mon Sep 17 00:00:00 2001 From: ChrisTerBeke Date: Tue, 15 May 2018 15:43:02 +0200 Subject: [PATCH 1/2] Only trigger settings filter on enter or after 500ms timeout --- resources/qml/Settings/SettingView.qml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index 272569daea..9152b463f0 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -179,6 +179,15 @@ Item height: visible ? UM.Theme.getSize("setting_control").height : 0 Behavior on height { NumberAnimation { duration: 100 } } + Timer + { + id: settingsSearchTimer + onTriggered: filter.editingFinished() + interval: 500 + running: false + repeat: false + } + TextField { id: filter; @@ -201,6 +210,11 @@ Item property bool lastFindingSettings: false onTextChanged: + { + settingsSearchTimer.restart() + } + + onEditingFinished: { definitionsModel.filter = {"i18n_label": "*" + text}; findingSettings = (text.length > 0); From 310aee07ac19cfd0695390e4ec69a791445c792a Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 16 May 2018 13:39:43 +0200 Subject: [PATCH 2/2] Code style: Brackets on new line As per our code style regulation. Contributes to issue CURA-5296. --- plugins/Toolbox/resources/qml/ToolboxDetailTile.qml | 9 ++++++--- .../resources/qml/ToolboxInstalledTileActions.qml | 6 ++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml b/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml index 739dc4ccfe..da53fc94af 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml @@ -59,14 +59,17 @@ Item id: installButton active: toolbox.isDownloading && toolbox.activePackage == model complete: tile.installed - readyAction: function() { + readyAction: function() + { toolbox.activePackage = model toolbox.startDownload(model.download_url) } - activeAction: function() { + activeAction: function() + { toolbox.cancelDownload() } - completeAction: function() { + completeAction: function() + { toolbox.viewCategory = "installed" } // Don't allow installing while another download is running diff --git a/plugins/Toolbox/resources/qml/ToolboxInstalledTileActions.qml b/plugins/Toolbox/resources/qml/ToolboxInstalledTileActions.qml index 5bbed2351c..8bdec4da5f 100644 --- a/plugins/Toolbox/resources/qml/ToolboxInstalledTileActions.qml +++ b/plugins/Toolbox/resources/qml/ToolboxInstalledTileActions.qml @@ -18,11 +18,13 @@ Column readyLabel: catalog.i18nc("@action:button", "Update") activeLabel: catalog.i18nc("@action:button", "Updating") completeLabel: catalog.i18nc("@action:button", "Updated") - readyAction: function() { + readyAction: function() + { toolbox.activePackage = model toolbox.update(model.id) } - activeAction: function() { + activeAction: function() + { toolbox.cancelDownload() } // Don't allow installing while another download is running