mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d8ee32d4b1 | |||
| f646b38ec9 |
@@ -18,6 +18,7 @@ import "../Components"
|
||||
PageType {
|
||||
id: root
|
||||
|
||||
property var selectedServerIndex: ServersModel.getDefaultServerIndex()
|
||||
Connections {
|
||||
target: PageController
|
||||
|
||||
@@ -75,7 +76,6 @@ PageType {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
DrawerType2 {
|
||||
id: drawer
|
||||
anchors.fill: parent
|
||||
@@ -178,7 +178,6 @@ PageType {
|
||||
anchors.right: parent.right
|
||||
anchors.left: parent.left
|
||||
|
||||
|
||||
Header1TextType {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 14
|
||||
@@ -281,27 +280,13 @@ PageType {
|
||||
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
|
||||
}
|
||||
interactive: true
|
||||
|
||||
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 {
|
||||
id: serversRadioButtonGroup
|
||||
}
|
||||
@@ -309,10 +294,24 @@ PageType {
|
||||
ListView {
|
||||
id: serversMenuContent
|
||||
width: parent.width
|
||||
height: serversMenuContent.contentItem.height
|
||||
spacing: 16
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.bottomMargin: 32
|
||||
|
||||
highlightFollowsCurrentItem: true
|
||||
highlightMoveDuration: 100
|
||||
|
||||
model: ServersModel
|
||||
currentIndex: ServersModel.defaultIndex
|
||||
|
||||
Component.onCompleted: currentIndex = selectedServerIndex //auto-scroll to the selected server
|
||||
|
||||
ScrollBar.vertical: ScrollBar {
|
||||
id: scrollBar
|
||||
active: true
|
||||
policy: serversContainer.height >= serversMenuContent.contentHeight ? ScrollBar.AlwaysOff : ScrollBar.AlwaysOn
|
||||
width: 12
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: ServersModel
|
||||
@@ -322,7 +321,7 @@ PageType {
|
||||
}
|
||||
|
||||
clip: true
|
||||
interactive: false
|
||||
interactive: true
|
||||
|
||||
delegate: Item {
|
||||
id: menuContentDelegate
|
||||
@@ -402,4 +401,3 @@ PageType {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user