on xenial help sign in
Logig is there
commitd365dfc38f0b1aa19df0086c957cb0fbe42ed41c authorJosh Arenson <joshua.arenson@canonical.com> dateWed 6 Jul 2016, 16:14 (10 years ago) parent7002f3c
2 files changed+27−38
qml/Greeter/SessionsList.qml+25−37 qml/Greeter/WideView.qml+2−1
qml/Greeter/SessionsList.qml+25−37
@@ -25,8 +25,8 @@ Item {
2525 objectName: "sessionsList"
2626
2727 property string initiallySelectedSession
28− //property alias selectedIndex: sessionsList.selectedIndex
2928 signal sessionSelected(string sessionKey)
29+ signal showLoginList()
3030
3131 LoginAreaContainer {
3232 height: units.gu(5) * sessionsList.model.count
@@ -40,8 +40,15 @@ Item {
4040
4141 UbuntuListView {
4242 id: sessionsList
43− anchors.fill: parent
44− anchors.margins: units.gu(2)
43+
44+ anchors {
45+ top: parent.top
46+ left: parent.left
47+ right: parent.right
48+ margins: units.gu(2)
49+ }
50+
51+ height: parent.height - currentItem.height
4552
4653 model: LightDMService.sessions
4754 header: ListItemLayout {
@@ -58,6 +65,11 @@ Item {
5865 width: units.gu(3)
5966 SlotsLayout.position: SlotsLayout.Leading
6067 name: "go-previous"
68+
69+ MouseArea {
70+ anchors.fill: parent
71+ onClicked: showLoginList()
72+ }
6173 }
6274 }
6375
@@ -71,7 +83,6 @@ Item {
7183 }
7284
7385 visible: sessionsList.currentItem.visible
74− y: sessionsList.currentItem.y
7586 }
7687
7788 delegate: ListItem {
@@ -81,12 +92,19 @@ Item {
8192 visible: y > sessionsList.headerItem.y
8293 + sessionsList.headerItem.height
8394 - sessionsList.anchors.margins
84− && (y + height) < root.height
8595
86− onYChanged: console.log("jam")
96+ /*property bool showHighlight: visible &&
97+ (sessionsList.currentIndex * height)
98+ - sessionsList.contentY
99+ < sessionsList.height + sessionsList.anchors.margins
100+ */
101+
87102 MouseArea {
88103 anchors.fill: parent
89− onClicked: sessionsList.currentIndex = index
104+ onClicked: {
105+ sessionsList.currentIndex = index
106+ sessionSelected(key)
107+ }
90108 }
91109
92110 ListItemLayout {
@@ -104,35 +122,5 @@ Item {
104122 }
105123 }
106124 }
107−
108− /*ItemSelector {
109− id: sessionsList
110− objectName: "sessionsListSelector"
111−
112− anchors.fill: parent
113− anchors.margins: units.dp(5)
114− clip: true
115− width: parent.width - units.gu(1)
116− expanded:true
117−
118− model: LightDMService.sessions
119− delegate: UnitySelectorDelegate {
120− objectName: "sessionDelegate" + index
121− colorImage: true
122− iconSource: icon_url
123− text: display
124−
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
130− }
131−
132− onDelegateClicked: {
133− sessionSelected(sessionsList.model.data(index,
134− LightDMService.sessionRoles.KeyRole));
135− }
136− }*/
137125 }
138126}
qml/Greeter/WideView.qml+2−1
@@ -223,10 +223,11 @@ FocusScope {
223223 Connections {
224224 target: !loginListShown ? loginAreaLoader.item : null
225225 onSessionSelected: {
226− loginAreaLoader.loginListShown = true
227226 loginAreaLoader.sessionUpdated = true
228227 loginAreaLoader.currentSession = sessionKey
229228 }
229+
230+ onShowLoginList: loginAreaLoader.loginListShown = true
230231 ignoreUnknownSignals: true
231232 }
232233 }