mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-24 20:18:53 +03:00
Move the device list into a separate scroll area
Scrolling the device list alongside all other user info is not a very great UX, so I've fixed it.
This commit is contained in:
parent
961cb403f7
commit
f6ffdc76d9
1 changed files with 448 additions and 449 deletions
|
@ -31,24 +31,12 @@ ApplicationWindow {
|
||||||
onActivated: userProfileDialog.close()
|
onActivated: userProfileDialog.close()
|
||||||
}
|
}
|
||||||
|
|
||||||
ListView {
|
ColumnLayout {
|
||||||
id: devicelist
|
|
||||||
|
|
||||||
property int selectedTab: 0
|
|
||||||
|
|
||||||
Layout.fillHeight: true
|
|
||||||
Layout.fillWidth: true
|
|
||||||
clip: true
|
|
||||||
spacing: 8
|
|
||||||
boundsBehavior: Flickable.StopAtBounds
|
|
||||||
anchors.fill: parent
|
|
||||||
anchors.margins: 10
|
|
||||||
footerPositioning: ListView.OverlayFooter
|
|
||||||
|
|
||||||
header: ColumnLayout {
|
|
||||||
id: contentL
|
id: contentL
|
||||||
|
|
||||||
width: devicelist.width
|
anchors.fill: parent
|
||||||
|
anchors.margins: 10
|
||||||
|
|
||||||
spacing: Nheko.paddingMedium
|
spacing: Nheko.paddingMedium
|
||||||
|
|
||||||
Avatar {
|
Avatar {
|
||||||
|
@ -328,7 +316,19 @@ ApplicationWindow {
|
||||||
|
|
||||||
Layout.bottomMargin: Nheko.paddingMedium
|
Layout.bottomMargin: Nheko.paddingMedium
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
ListView {
|
||||||
|
id: devicelist
|
||||||
|
|
||||||
|
property int selectedTab: 0
|
||||||
|
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Layout.fillWidth: true
|
||||||
|
clip: true
|
||||||
|
spacing: 8
|
||||||
|
boundsBehavior: Flickable.StopAtBounds
|
||||||
|
footerPositioning: ListView.OverlayFooter
|
||||||
|
ScrollBar.vertical: ScrollBar {}
|
||||||
|
|
||||||
model: (selectedTab == 0) ? devicesModel : sharedRoomsModel
|
model: (selectedTab == 0) ? devicesModel : sharedRoomsModel
|
||||||
|
|
||||||
|
@ -519,10 +519,11 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
footer: DialogButtonBox {
|
DialogButtonBox {
|
||||||
z: 2
|
z: 2
|
||||||
width: devicelist.width
|
Layout.fillWidth: true
|
||||||
alignment: Qt.AlignRight
|
alignment: Qt.AlignRight
|
||||||
standardButtons: DialogButtonBox.Ok
|
standardButtons: DialogButtonBox.Ok
|
||||||
onAccepted: userProfileDialog.close()
|
onAccepted: userProfileDialog.close()
|
||||||
|
@ -533,7 +534,5 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue