Merge pull request #712 from amnezia-vpn/bugfix/page-home-recursive-rearrange
fixed recursive rearrange on PageHome
This commit is contained in:
commit
f6acec53c0
2 changed files with 88 additions and 106 deletions
|
@ -89,12 +89,12 @@ RadioButton {
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: Item {
|
contentItem: Item {
|
||||||
implicitWidth: content.implicitWidth
|
anchors.left: parent.left
|
||||||
implicitHeight: content.implicitHeight
|
anchors.right: parent.right
|
||||||
|
|
||||||
anchors.fill: parent
|
|
||||||
anchors.leftMargin: 8 + background.width
|
anchors.leftMargin: 8 + background.width
|
||||||
|
|
||||||
|
implicitHeight: content.implicitHeight
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: content
|
id: content
|
||||||
|
|
||||||
|
|
|
@ -299,34 +299,6 @@ PageType {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Flickable {
|
|
||||||
id: serversContainer
|
|
||||||
|
|
||||||
anchors.top: serversMenuHeader.bottom
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.topMargin: 16
|
|
||||||
|
|
||||||
contentHeight: col.height + col.anchors.bottomMargin
|
|
||||||
implicitHeight: parent.height - serversMenuHeader.implicitHeight
|
|
||||||
clip: true
|
|
||||||
|
|
||||||
ScrollBar.vertical: ScrollBar {
|
|
||||||
id: scrollBar
|
|
||||||
policy: serversContainer.height >= serversContainer.contentHeight ? ScrollBar.AlwaysOff : ScrollBar.AlwaysOn
|
|
||||||
}
|
|
||||||
|
|
||||||
Keys.onUpPressed: scrollBar.decrease()
|
|
||||||
Keys.onDownPressed: scrollBar.increase()
|
|
||||||
|
|
||||||
Column {
|
|
||||||
id: col
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.bottomMargin: 32
|
|
||||||
|
|
||||||
spacing: 16
|
|
||||||
|
|
||||||
ButtonGroup {
|
ButtonGroup {
|
||||||
id: serversRadioButtonGroup
|
id: serversRadioButtonGroup
|
||||||
|
@ -334,12 +306,24 @@ PageType {
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
id: serversMenuContent
|
id: serversMenuContent
|
||||||
width: parent.width
|
|
||||||
height: serversMenuContent.contentItem.height
|
anchors.top: serversMenuHeader.bottom
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.topMargin: 16
|
||||||
|
|
||||||
model: ServersModel
|
model: ServersModel
|
||||||
currentIndex: ServersModel.defaultIndex
|
currentIndex: ServersModel.defaultIndex
|
||||||
|
|
||||||
|
ScrollBar.vertical: ScrollBar {
|
||||||
|
id: scrollBar
|
||||||
|
policy: serversMenuContent.height >= serversMenuContent.contentHeight ? ScrollBar.AlwaysOff : ScrollBar.AlwaysOn
|
||||||
|
}
|
||||||
|
|
||||||
|
Keys.onUpPressed: scrollBar.decrease()
|
||||||
|
Keys.onDownPressed: scrollBar.increase()
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: ServersModel
|
target: ServersModel
|
||||||
function onDefaultServerIndexChanged(serverIndex) {
|
function onDefaultServerIndexChanged(serverIndex) {
|
||||||
|
@ -348,7 +332,6 @@ PageType {
|
||||||
}
|
}
|
||||||
|
|
||||||
clip: true
|
clip: true
|
||||||
interactive: false
|
|
||||||
|
|
||||||
delegate: Item {
|
delegate: Item {
|
||||||
id: menuContentDelegate
|
id: menuContentDelegate
|
||||||
|
@ -368,6 +351,7 @@ PageType {
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
VerticalRadioButton {
|
VerticalRadioButton {
|
||||||
id: serverRadioButton
|
id: serverRadioButton
|
||||||
|
|
||||||
|
@ -426,6 +410,4 @@ PageType {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue