on xenial help sign in
Make sessions list height dynamic and nice
1b334c6Josh Arenson
qml/Greeter/SessionsList.qml+8−2
@@ -29,7 +29,13 @@ Item {
29 signal showLoginList()
29 signal showLoginList()
30
30
31 LoginAreaContainer {
31 LoginAreaContainer {
32− height: units.gu(30)
32+ readonly property real maxHeight: {
33+ (sessionsList.currentItem.height * sessionsList.model.count) +
34+ (sessionsList.headerItem.height + sessionsList.anchors.margins) -
35+ units.gu(4) //some margins
36+ }
37+
38+ height: maxHeight < parent.height ? maxHeight : parent.height - units.gu(4)
33 width: parent.width
39 width: parent.width
34
40
35 anchors {
41 anchors {
@@ -48,7 +54,7 @@ Item {
48 margins: units.gu(2)
54 margins: units.gu(2)
49 }
55 }
50
56
51− height: parent.height - currentItem.height
57+ height: parent.height - currentItem.height - units.gu(2)
52
58
53 model: LightDMService.sessions
59 model: LightDMService.sessions
54 header: ListItemLayout {
60 header: ListItemLayout {