on xenial help sign in
All orange everything
d7533e0Josh Arenson
qml/Greeter/SessionsList.qml+3−15
@@ -48,17 +48,6 @@ Item {
48 return session;
48 return session;
49 }
49 }
50
50
51− QtObject {
52− id: d
53− // Track if the session has changed and the list is still shown.
54− // This is currently only possible/reasonable with keyboard navigation
55− property bool sessionChanged: false
56− function sessionSelected(currentKey) {
57− d.sessionChanged = true;
58− root.sessionSelected(currentKey)
59− }
60− }
61−
62 Keys.onEnterPressed: {
51 Keys.onEnterPressed: {
63 showLoginList(); // Session is already selected
52 showLoginList(); // Session is already selected
64 event.accepted = true;
53 event.accepted = true;
@@ -77,14 +66,14 @@ Item {
77 Keys.onDownPressed: {
66 Keys.onDownPressed: {
78 if (sessionsList.currentIndex < sessionsList.model.count - 1)
67 if (sessionsList.currentIndex < sessionsList.model.count - 1)
79 sessionsList.currentIndex++;
68 sessionsList.currentIndex++;
80− d.sessionSelected(currentKey());
69+ sessionSelected(currentKey());
81 event.accepted = true;
70 event.accepted = true;
82 }
71 }
83
72
84 Keys.onUpPressed: {
73 Keys.onUpPressed: {
85 if (sessionsList.currentIndex > 0)
74 if (sessionsList.currentIndex > 0)
86 sessionsList.currentIndex--;
75 sessionsList.currentIndex--;
87− d.sessionSelected(currentKey());
76+ sessionSelected(currentKey());
88 event.accepted = true;
77 event.accepted = true;
89 }
78 }
90
79
@@ -172,8 +161,7 @@ Item {
172 width: parent.width
161 width: parent.width
173 color: "transparent"
162 color: "transparent"
174 border {
163 border {
175− color: d.sessionChanged ? theme.palette.normal.focus
164+ color: theme.palette.normal.focus
176− : theme.palette.normal.positionText
177 width: units.gu(0.2)
165 width: units.gu(0.2)
178 }
166 }
179
167