mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
update InstalledAppsDrawer
This commit is contained in:
@@ -57,7 +57,7 @@ DrawerType2 {
|
|||||||
headerText: qsTr("Choose application")
|
headerText: qsTr("Choose application")
|
||||||
}
|
}
|
||||||
|
|
||||||
ListView {
|
ListViewType {
|
||||||
id: listView
|
id: listView
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
@@ -66,11 +66,6 @@ DrawerType2 {
|
|||||||
Layout.rightMargin: 16
|
Layout.rightMargin: 16
|
||||||
Layout.leftMargin: 16
|
Layout.leftMargin: 16
|
||||||
|
|
||||||
clip: true
|
|
||||||
interactive: true
|
|
||||||
|
|
||||||
property bool isFocusable: true
|
|
||||||
|
|
||||||
model: SortFilterProxyModel {
|
model: SortFilterProxyModel {
|
||||||
id: proxyInstalledAppsModel
|
id: proxyInstalledAppsModel
|
||||||
sourceModel: installedAppsModel
|
sourceModel: installedAppsModel
|
||||||
@@ -81,44 +76,35 @@ DrawerType2 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ScrollBar.vertical: ScrollBarType {}
|
|
||||||
|
|
||||||
ButtonGroup {
|
ButtonGroup {
|
||||||
id: buttonGroup
|
id: buttonGroup
|
||||||
}
|
}
|
||||||
|
|
||||||
delegate: Item {
|
delegate: ColumnLayout {
|
||||||
implicitWidth: root.width
|
width: listView.width
|
||||||
implicitHeight: delegateContent.implicitHeight
|
|
||||||
|
|
||||||
ColumnLayout {
|
RowLayout {
|
||||||
id: delegateContent
|
CheckBoxType {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
anchors.fill: parent
|
text: appName
|
||||||
|
checked: isAppSelected
|
||||||
RowLayout {
|
onCheckedChanged: {
|
||||||
CheckBoxType {
|
installedAppsModel.selectedStateChanged(proxyInstalledAppsModel.mapToSource(index), checked)
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
text: appName
|
|
||||||
checked: isAppSelected
|
|
||||||
onCheckedChanged: {
|
|
||||||
installedAppsModel.selectedStateChanged(proxyInstalledAppsModel.mapToSource(index), checked)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Image {
|
|
||||||
source: "image://installedAppImage/" + appIcon
|
|
||||||
|
|
||||||
sourceSize.width: 24
|
|
||||||
sourceSize.height: 24
|
|
||||||
|
|
||||||
Layout.rightMargin: 48
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DividerType {}
|
Image {
|
||||||
|
source: "image://installedAppImage/" + appIcon
|
||||||
|
|
||||||
|
sourceSize.width: 24
|
||||||
|
sourceSize.height: 24
|
||||||
|
|
||||||
|
Layout.rightMargin: 48
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DividerType {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user