diff --git a/client/ui/qml/Pages2/PageSetupWizardApiServicesList.qml b/client/ui/qml/Pages2/PageSetupWizardApiServicesList.qml index 207c305e9..8889f867e 100644 --- a/client/ui/qml/Pages2/PageSetupWizardApiServicesList.qml +++ b/client/ui/qml/Pages2/PageSetupWizardApiServicesList.qml @@ -28,19 +28,10 @@ PageType { Layout.topMargin: 20 } - BaseHeaderType { - Layout.fillWidth: true - Layout.topMargin: 8 - Layout.rightMargin: 16 - Layout.leftMargin: 16 - Layout.bottomMargin: 16 - - headerText: qsTr("VPN by Amnezia") - descriptionText: qsTr("Choose a VPN service that suits your needs.") - } + } - ListView { + ListViewType { id: servicesListView anchors.top: header.bottom @@ -48,52 +39,54 @@ PageType { anchors.left: parent.left anchors.bottom: parent.bottom anchors.topMargin: 16 - spacing: 0 - property bool isFocusable: true - - clip: true - reuseItems: true + header: ColumnLayout { + width: listView.width + + BaseHeaderType { + Layout.fillWidth: true + Layout.rightMargin: 16 + Layout.leftMargin: 16 + Layout.bottomMargin: 24 + + headerText: qsTr("VPN by Amnezia") + descriptionText: qsTr("Choose a VPN service that suits your needs.") + } + } + + spacing: 0 model: ApiServicesModel - ScrollBar.vertical: ScrollBarType {} + delegate: ColumnLayout { - delegate: Item { - implicitWidth: servicesListView.width - implicitHeight: delegateContent.implicitHeight + width: listView.width enabled: isServiceAvailable - ColumnLayout { - id: delegateContent + CardWithIconsType { + id: card - anchors.fill: parent + Layout.fillWidth: true + Layout.rightMargin: 16 + Layout.leftMargin: 16 + Layout.bottomMargin: 16 - CardWithIconsType { - id: card + headerText: name + bodyText: cardDescription + footerText: price - Layout.fillWidth: true - Layout.rightMargin: 16 - Layout.leftMargin: 16 - Layout.bottomMargin: 16 + rightImageSource: "qrc:/images/controls/chevron-right.svg" - headerText: name - bodyText: cardDescription - footerText: price - - rightImageSource: "qrc:/images/controls/chevron-right.svg" - - onClicked: { - if (isServiceAvailable) { - ApiServicesModel.setServiceIndex(index) - PageController.goToPage(PageEnum.PageSetupWizardApiServiceInfo) - } + onClicked: { + if (isServiceAvailable) { + ApiServicesModel.setServiceIndex(index) + PageController.goToPage(PageEnum.PageSetupWizardApiServiceInfo) } - - Keys.onEnterPressed: this.clicked() - Keys.onReturnPressed: this.clicked() } + + Keys.onEnterPressed: clicked() + Keys.onReturnPressed: clicked() } } }