on xenial help sign in
Fix highlight colors
99e25ebJosh Arenson
qml/Greeter/LoginList.qml+2
@@ -88,6 +88,7 @@ StyledItem {
88 id: d
88 id: d
89
89
90 function checkIfPromptless() {
90 function checkIfPromptless() {
91+ console.log("JOSH-> Entering LoginList:checkIfPromptless(): " + waiting + " : " + wasPrompted);
91 if (!waiting && !wasPrompted) {
92 if (!waiting && !wasPrompted) {
92 passwordInput.isPrompt = false;
93 passwordInput.isPrompt = false;
93 passwordInput.text = root.locked ? i18n.tr("Retry")
94 passwordInput.text = root.locked ? i18n.tr("Retry")
@@ -161,6 +162,7 @@ StyledItem {
161 moveTimer.start();
162 moveTimer.start();
162 }
163 }
163
164
165+ onCurrentItemChanged: console.log("JOSH-> LoginList currentItem.height = " + currentItem.height);
164 delegate: Item {
166 delegate: Item {
165 width: parent.width
167 width: parent.width
166 height: root.cellHeight
168 height: root.cellHeight
qml/Greeter/SessionsList.qml+15−3
@@ -48,6 +48,17 @@ 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+
51 Keys.onEnterPressed: {
62 Keys.onEnterPressed: {
52 showLoginList(); // Session is already selected
63 showLoginList(); // Session is already selected
53 event.accepted = true;
64 event.accepted = true;
@@ -66,14 +77,14 @@ Item {
66 Keys.onDownPressed: {
77 Keys.onDownPressed: {
67 if (sessionsList.currentIndex < sessionsList.model.count - 1)
78 if (sessionsList.currentIndex < sessionsList.model.count - 1)
68 sessionsList.currentIndex++;
79 sessionsList.currentIndex++;
69− sessionSelected(currentKey());
80+ d.sessionSelected(currentKey());
70 event.accepted = true;
81 event.accepted = true;
71 }
82 }
72
83
73 Keys.onUpPressed: {
84 Keys.onUpPressed: {
74 if (sessionsList.currentIndex > 0)
85 if (sessionsList.currentIndex > 0)
75 sessionsList.currentIndex--;
86 sessionsList.currentIndex--;
76− sessionSelected(currentKey());
87+ d.sessionSelected(currentKey());
77 event.accepted = true;
88 event.accepted = true;
78 }
89 }
79
90
@@ -161,7 +172,8 @@ Item {
161 width: parent.width
172 width: parent.width
162 color: "transparent"
173 color: "transparent"
163 border {
174 border {
175+ color: d.sessionChanged ? theme.palette.normal.focus
164− color: theme.palette.normal.positionText
176+ : theme.palette.normal.positionText
165 width: units.gu(0.2)
177 width: units.gu(0.2)
166 }
178 }
167
179