Correctly size the device list page

This commit is contained in:
miruka 2020-06-26 02:51:31 -04:00
parent eca801df4c
commit 2e610cf167
2 changed files with 13 additions and 1 deletions

View File

@ -2,10 +2,10 @@
- handle `{}` bad `DevicesResponse`
- delete devices (do that in key verification popup instead of blacklisting)
- sessions page size
- flickshortcuts
- avatar upload/change component
- device list keyboard navigation
- device IP geolocation
- field/area focus line in popups weird
- clear listview checked on message clear

View File

@ -8,12 +8,22 @@ import "../../PythonBridge"
HColumnPage {
id: page
contentHeight: Math.min(
window.height,
Math.max(
deviceList.contentHeight + deviceList.bottomMargin,
busyIndicatorLoader.height + theme.spacing * 2,
)
)
property string userId
property Future loadFuture: null
// property var pr: column.childrenRect.height
// onPrChanged: print("pr changed:", pr, deviceList.implicitHeight)
function takeFocus() {} // XXX
@ -79,6 +89,7 @@ HColumnPage {
// Don't bind directly to getSectionItemCounts(), laggy with big list
property var sectionItemCounts: ({})
bottomMargin: theme.spacing
clip: true
model: ListModel {}
delegate: DeviceDelegate {
@ -102,6 +113,7 @@ HColumnPage {
Layout.fillHeight: true
HLoader {
id: busyIndicatorLoader
anchors.centerIn: parent
width: 96 * theme.uiScale
height: width