on xenial help sign in
Fix highlight colors
commit99e25eb1d86aa02931396821c38c73055c290043 authorJosh Arenson <joshua.arenson@canonical.com> dateMon 12 Sep 2016, 20:39 (10 years ago) parentb23877e
2 files changed+17−3
qml/Greeter/LoginList.qml+2 qml/Greeter/SessionsList.qml+15−3
qml/Greeter/LoginList.qml+2
@@ -88,6 +88,7 @@ StyledItem {
8888 id: d
8989
9090 function checkIfPromptless() {
91+ console.log("JOSH-> Entering LoginList:checkIfPromptless(): " + waiting + " : " + wasPrompted);
9192 if (!waiting && !wasPrompted) {
9293 passwordInput.isPrompt = false;
9394 passwordInput.text = root.locked ? i18n.tr("Retry")
@@ -161,6 +162,7 @@ StyledItem {
161162 moveTimer.start();
162163 }
163164
165+ onCurrentItemChanged: console.log("JOSH-> LoginList currentItem.height = " + currentItem.height);
164166 delegate: Item {
165167 width: parent.width
166168 height: root.cellHeight
qml/Greeter/SessionsList.qml+15−3
@@ -48,6 +48,17 @@ Item {
4848 return session;
4949 }
5050
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+
5162 Keys.onEnterPressed: {
5263 showLoginList(); // Session is already selected
5364 event.accepted = true;
@@ -66,14 +77,14 @@ Item {
6677 Keys.onDownPressed: {
6778 if (sessionsList.currentIndex < sessionsList.model.count - 1)
6879 sessionsList.currentIndex++;
69− sessionSelected(currentKey());
80+ d.sessionSelected(currentKey());
7081 event.accepted = true;
7182 }
7283
7384 Keys.onUpPressed: {
7485 if (sessionsList.currentIndex > 0)
7586 sessionsList.currentIndex--;
76− sessionSelected(currentKey());
87+ d.sessionSelected(currentKey());
7788 event.accepted = true;
7889 }
7990
@@ -161,7 +172,8 @@ Item {
161172 width: parent.width
162173 color: "transparent"
163174 border {
164− color: theme.palette.normal.positionText
175+ color: d.sessionChanged ? theme.palette.normal.focus
176+ : theme.palette.normal.positionText
165177 width: units.gu(0.2)
166178 }
167179