@@ -25,8 +25,8 @@ Item {
25 objectName: "sessionsList"
25 objectName: "sessionsList"
27 property string initiallySelectedSession
27 property string initiallySelectedSession
28− //property alias selectedIndex: sessionsList.selectedIndex
29 signal sessionSelected(string sessionKey)
28 signal sessionSelected(string sessionKey)
29+ signal showLoginList()
31 LoginAreaContainer {
31 LoginAreaContainer {
32 height: units.gu(5) * sessionsList.model.count
32 height: units.gu(5) * sessionsList.model.count
@@ -40,8 +40,15 @@ Item {
41 UbuntuListView {
41 UbuntuListView {
42 id: sessionsList
42 id: sessionsList
43− anchors.fill: parent
44+ anchors {
44− anchors.margins: units.gu(2)
48+ margins: units.gu(2)
51+ height: parent.height - currentItem.height
46 model: LightDMService.sessions
53 model: LightDMService.sessions
47 header: ListItemLayout {
54 header: ListItemLayout {
@@ -58,6 +65,11 @@ Item {
58 width: units.gu(3)
65 width: units.gu(3)
59 SlotsLayout.position: SlotsLayout.Leading
66 SlotsLayout.position: SlotsLayout.Leading
60 name: "go-previous"
67 name: "go-previous"
71+ onClicked: showLoginList()
@@ -71,7 +83,6 @@ Item {
73 visible: sessionsList.currentItem.visible
85 visible: sessionsList.currentItem.visible
74− y: sessionsList.currentItem.y
77 delegate: ListItem {
88 delegate: ListItem {
@@ -81,12 +92,19 @@ Item {
81 visible: y > sessionsList.headerItem.y
92 visible: y > sessionsList.headerItem.y
82 + sessionsList.headerItem.height
93 + sessionsList.headerItem.height
83 - sessionsList.anchors.margins
94 - sessionsList.anchors.margins
84− && (y + height) < root.height
86− onYChanged: console.log("jam")
96+ /*property bool showHighlight: visible &&
97+ (sessionsList.currentIndex * height)
98+ - sessionsList.contentY
99+ < sessionsList.height + sessionsList.anchors.margins
87 MouseArea {
102 MouseArea {
88 anchors.fill: parent
103 anchors.fill: parent
89− onClicked: sessionsList.currentIndex = index
105+ sessionsList.currentIndex = index
106+ sessionSelected(key)
92 ListItemLayout {
110 ListItemLayout {
@@ -104,35 +122,5 @@ Item {
110− objectName: "sessionsListSelector"
112− anchors.fill: parent
113− anchors.margins: units.dp(5)
115− width: parent.width - units.gu(1)
118− model: LightDMService.sessions
119− delegate: UnitySelectorDelegate {
120− objectName: "sessionDelegate" + index
122− iconSource: icon_url
125− // This matches the color for LoginList
126− assetColor: selected ? theme.palette.normal.backgroundText :
127− theme.palette.normal.raisedSecondaryText
128− textColor: selected ? theme.palette.normal.selectionText : theme.palette.normal.raisedText
129− selected: key === initiallySelectedSession
132− onDelegateClicked: {
133− sessionSelected(sessionsList.model.data(index,
134− LightDMService.sessionRoles.KeyRole));