mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-24 02:00:24 +07:00
replace FlickableType with ListViewType in PageSettingsAppSplitTunneling and adjust layout for better structure
This commit is contained in:
@@ -50,6 +50,7 @@ PageType {
|
|||||||
readonly property string name: qsTr("Only the apps from the list should have access via VPN")
|
readonly property string name: qsTr("Only the apps from the list should have access via VPN")
|
||||||
readonly property int type: routeMode.onlyForwardApps
|
readonly property int type: routeMode.onlyForwardApps
|
||||||
}
|
}
|
||||||
|
|
||||||
QtObject {
|
QtObject {
|
||||||
id: allExceptApps
|
id: allExceptApps
|
||||||
|
|
||||||
@@ -111,7 +112,7 @@ PageType {
|
|||||||
|
|
||||||
headerText: qsTr("Mode")
|
headerText: qsTr("Mode")
|
||||||
|
|
||||||
enabled: Qt.platform.os === "android" && root.pageEnabled
|
enabled: (Qt.platform.os === "android") && root.pageEnabled
|
||||||
|
|
||||||
listView: ListViewWithRadioButtonType {
|
listView: ListViewWithRadioButtonType {
|
||||||
rootWidth: root.width
|
rootWidth: root.width
|
||||||
@@ -146,24 +147,14 @@ PageType {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FlickableType {
|
ListViewType {
|
||||||
|
id: listView
|
||||||
|
|
||||||
anchors.top: header.bottom
|
anchors.top: header.bottom
|
||||||
anchors.topMargin: 16
|
anchors.bottom: addAppButton.top
|
||||||
contentHeight: col.implicitHeight + addAppButton.implicitHeight + addAppButton.anchors.bottomMargin + addAppButton.anchors.topMargin
|
|
||||||
|
|
||||||
enabled: root.pageEnabled
|
|
||||||
|
|
||||||
Column {
|
|
||||||
id: col
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
|
||||||
ListView {
|
|
||||||
id: apps
|
|
||||||
width: parent.width
|
|
||||||
height: apps.contentItem.height
|
|
||||||
|
|
||||||
model: SortFilterProxyModel {
|
model: SortFilterProxyModel {
|
||||||
id: proxyAppSplitTunnelingModel
|
id: proxyAppSplitTunnelingModel
|
||||||
sourceModel: AppSplitTunnelingModel
|
sourceModel: AppSplitTunnelingModel
|
||||||
@@ -177,23 +168,15 @@ PageType {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
clip: true
|
delegate: ColumnLayout {
|
||||||
interactive: false
|
width: listView.width
|
||||||
|
|
||||||
delegate: Item {
|
|
||||||
implicitWidth: apps.width
|
|
||||||
implicitHeight: delegateContent.implicitHeight
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
id: delegateContent
|
|
||||||
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
|
|
||||||
LabelWithButtonType {
|
LabelWithButtonType {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
Layout.leftMargin: 16
|
||||||
|
Layout.rightMargin: 16
|
||||||
|
|
||||||
text: appPath
|
text: appPath
|
||||||
rightImageSource: "qrc:/images/controls/trash.svg"
|
rightImageSource: "qrc:/images/controls/trash.svg"
|
||||||
rightImageColor: AmneziaStyle.color.paleGray
|
rightImageColor: AmneziaStyle.color.paleGray
|
||||||
@@ -216,9 +199,6 @@ PageType {
|
|||||||
DividerType {}
|
DividerType {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: addAppButton
|
anchors.fill: addAppButton
|
||||||
|
|||||||
Reference in New Issue
Block a user