From d22178ca5e91bfdbf74bd92e6cc1baceebdcdc23 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 9 Jun 2020 12:13:44 +0200 Subject: [PATCH] [welcomeq] Show filtered list of requirements - only the unsatisfied ones are shown; no need to filter and fiddle about in QML --- src/modules/welcomeq/Requirements.qml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/modules/welcomeq/Requirements.qml b/src/modules/welcomeq/Requirements.qml index a376c6010..e7835d868 100644 --- a/src/modules/welcomeq/Requirements.qml +++ b/src/modules/welcomeq/Requirements.qml @@ -64,18 +64,15 @@ Rectangle { Item { width: 640 - // Hide the satisfied requirements; we could do that with - // a filtering model, but here we'll just hide it, but also - // need to compensate for the spacing between items. - height: !satisfied ? 35 : -requirementsList.spacing - visible: !satisfied + height: 35 + visible: true Column { anchors.centerIn: parent Rectangle { implicitWidth: 640 - implicitHeight: !satisfied ? 35 : 0 + implicitHeight: 35 // Colors and images based on the two satisfied-bools: // - if satisfied, then green / ok // - otherwise if mandatory, then red / stop @@ -104,7 +101,10 @@ Rectangle { id: requirementsList anchors.fill: parent spacing: 5 - model: config.requirementsModel + // This uses the filtered model, so that only unsatisfied + // requirements are ever shown. You could use *requirementsModel* + // to get all of them. + model: config.unsatisfiedRequirements delegate: requirementsDelegate } }