bugfix: added scroll on page with services list (#1262)
* added scroll on page with services list * fixed margins on PageSetupWizardApiServicesList
This commit is contained in:
parent
e0b091b474
commit
2130131a9d
3 changed files with 60 additions and 61 deletions
|
@ -145,6 +145,7 @@ Button {
|
||||||
|
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
|
enabled: root.enabled
|
||||||
|
|
||||||
onEntered: {
|
onEntered: {
|
||||||
backgroundRect.color = root.hoveredColor
|
backgroundRect.color = root.hoveredColor
|
||||||
|
|
|
@ -16,14 +16,8 @@ PageType {
|
||||||
|
|
||||||
defaultActiveFocusItem: focusItem
|
defaultActiveFocusItem: focusItem
|
||||||
|
|
||||||
FlickableType {
|
|
||||||
id: fl
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
contentHeight: content.height
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: content
|
id: header
|
||||||
|
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
@ -47,32 +41,36 @@ PageType {
|
||||||
Layout.topMargin: 8
|
Layout.topMargin: 8
|
||||||
Layout.rightMargin: 16
|
Layout.rightMargin: 16
|
||||||
Layout.leftMargin: 16
|
Layout.leftMargin: 16
|
||||||
Layout.bottomMargin: 32
|
Layout.bottomMargin: 16
|
||||||
|
|
||||||
headerText: qsTr("VPN by Amnezia")
|
headerText: qsTr("VPN by Amnezia")
|
||||||
descriptionText: qsTr("Choose a VPN service that suits your needs.")
|
descriptionText: qsTr("Choose a VPN service that suits your needs.")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
id: containers
|
id: servicesListView
|
||||||
width: parent.width
|
anchors.top: header.bottom
|
||||||
height: containers.contentItem.height
|
anchors.right: parent.right
|
||||||
spacing: 16
|
anchors.left: parent.left
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.topMargin: 16
|
||||||
|
spacing: 0
|
||||||
|
|
||||||
currentIndex: 1
|
currentIndex: 1
|
||||||
interactive: false
|
clip: true
|
||||||
model: ApiServicesModel
|
model: ApiServicesModel
|
||||||
|
|
||||||
|
ScrollBar.vertical: ScrollBar {}
|
||||||
|
|
||||||
delegate: Item {
|
delegate: Item {
|
||||||
implicitWidth: containers.width
|
implicitWidth: servicesListView.width
|
||||||
implicitHeight: delegateContent.implicitHeight
|
implicitHeight: delegateContent.implicitHeight
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: delegateContent
|
id: delegateContent
|
||||||
|
|
||||||
anchors.top: parent.top
|
anchors.fill: parent
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
|
|
||||||
CardWithIconsType {
|
CardWithIconsType {
|
||||||
id: card
|
id: card
|
||||||
|
@ -80,6 +78,7 @@ PageType {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.rightMargin: 16
|
Layout.rightMargin: 16
|
||||||
Layout.leftMargin: 16
|
Layout.leftMargin: 16
|
||||||
|
Layout.bottomMargin: 16
|
||||||
|
|
||||||
headerText: name
|
headerText: name
|
||||||
bodyText: cardDescription
|
bodyText: cardDescription
|
||||||
|
@ -87,6 +86,8 @@ PageType {
|
||||||
|
|
||||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||||
|
|
||||||
|
enabled: isServiceAvailable
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (isServiceAvailable) {
|
if (isServiceAvailable) {
|
||||||
ApiServicesModel.setServiceIndex(index)
|
ApiServicesModel.setServiceIndex(index)
|
||||||
|
@ -97,6 +98,4 @@ PageType {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,6 @@ PageType {
|
||||||
KeyNavigation.tab: textKey.textField
|
KeyNavigation.tab: textKey.textField
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
HeaderType {
|
HeaderType {
|
||||||
property bool isVisible: SettingsController.getInstallationUuid() !== "" || PageController.isStartPageVisible()
|
property bool isVisible: SettingsController.getInstallationUuid() !== "" || PageController.isStartPageVisible()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue