@@ -15,10 +15,11 @@
17import QtQuick 2.4
17import QtQuick 2.4
18+import QtGraphicalEffects 1.0
18import Ubuntu.Components 1.3
19import Ubuntu.Components 1.3
19import "../Components"
20import "../Components"
24 property alias model: userList.model
25 property alias model: userList.model
@@ -28,7 +29,7 @@ Item {
29 readonly property int numAboveBelow: 4
30 readonly property int numAboveBelow: 4
30 readonly property int cellHeight: units.gu(5)
31 readonly property int cellHeight: units.gu(5)
31− readonly property int highlightedHeight: units.gu(10)
32+ readonly property int highlightedHeight: units.gu(15)
32 readonly property int moveDuration: 200
33 readonly property int moveDuration: 200
33 readonly property string currentUser: userList.currentItem.username
34 readonly property string currentUser: userList.currentItem.username
34 property bool wasPrompted: false
35 property bool wasPrompted: false
@@ -83,6 +84,8 @@ Item {
83 property string promptText
84 property string promptText
87+ theme.name: "Ubuntu.Components.Themes.Ambiance"
86 Keys.onEscapePressed: {
89 Keys.onEscapePressed: {
87 selected(currentIndex);
90 selected(currentIndex);
@@ -91,16 +94,30 @@ Item {
91 userList.currentIndex = currentIndex;
94 userList.currentIndex = currentIndex;
100+ topMargin: -units.gu(1)
101+ leftMargin: -units.gu(1.5)
102+ rightMargin: -units.gu(1.5)
103+ bottomMargin: -units.gu(1.5)
105+ source: "../Stages/graphics/dropshadow2gu.sci"
94 UbuntuShape {
109 UbuntuShape {
95 id: highlightItem
110 id: highlightItem
96 anchors {
111 anchors {
97 left: parent.left
112 left: parent.left
113+ leftMargin: units.gu(2)
98 right: parent.right
114 right: parent.right
115+ rightMargin: units.gu(2)
99 verticalCenter: parent.verticalCenter
116 verticalCenter: parent.verticalCenter
101 height: root.highlightedHeight
118 height: root.highlightedHeight
102 aspect: UbuntuShape.Flat
119 aspect: UbuntuShape.Flat
103− backgroundColor: Qt.rgba(0, 0, 0, 0.4)
120+ backgroundColor: theme.palette.normal.raised
106 ListView {
123 ListView {
@@ -108,6 +125,8 @@ Item {
108 objectName: "userList"
125 objectName: "userList"
110 anchors.fill: parent
127 anchors.fill: parent
128+ anchors.leftMargin: units.gu(2)
129+ anchors.rightMargin: units.gu(2)
112 preferredHighlightBegin: userList.height / 2 - root.highlightedHeight / 2
131 preferredHighlightBegin: userList.height / 2 - root.highlightedHeight / 2
113 preferredHighlightEnd: userList.height / 2 - root.highlightedHeight / 2
132 preferredHighlightEnd: userList.height / 2 - root.highlightedHeight / 2
@@ -158,15 +177,15 @@ Item {
159 anchors {
178 anchors {
160 left: parent.left
179 left: parent.left
161− leftMargin: units.gu(1)
180+ leftMargin: units.gu(2)
162 right: parent.right
181 right: parent.right
163− rightMargin: units.gu(1)
182+ rightMargin: units.gu(2)
164 bottom: parent.top
183 bottom: parent.top
165 // Add an offset to bottomMargin for any items below the highlight
184 // Add an offset to bottomMargin for any items below the highlight
166− bottomMargin: -(units.gu(3) + (parent.belowHighlight ? parent.belowOffset : 0))
185+ bottomMargin: -(units.gu(4) + (parent.belowHighlight ? parent.belowOffset : 0))
168 text: realName
187 text: realName
169− color: theme.palette.normal.backgroundText
188+ color: userList.currentIndex !== index ? theme.palette.normal.raised : theme.palette.normal.raisedText
171 Behavior on anchors.topMargin { NumberAnimation { duration: root.moveDuration; easing.type: Easing.InOutQuad; } }
190 Behavior on anchors.topMargin { NumberAnimation { duration: root.moveDuration; easing.type: Easing.InOutQuad; } }
@@ -202,14 +221,14 @@ Item {
202 objectName: "infoLabel"
221 objectName: "infoLabel"
203 anchors {
222 anchors {
204 bottom: passwordInput.top
223 bottom: passwordInput.top
205− left: parent.left
224+ left: highlightItem.left
206 topMargin: units.gu(1)
225 topMargin: units.gu(1)
207 bottomMargin: units.gu(1)
226 bottomMargin: units.gu(1)
208 leftMargin: units.gu(2)
227 leftMargin: units.gu(2)
209 rightMargin: units.gu(1)
228 rightMargin: units.gu(1)
212− color: theme.palette.normal.backgroundText
231+ color: theme.palette.normal.raisedText
213 width: root.width - anchors.leftMargin - anchors.rightMargin
232 width: root.width - anchors.leftMargin - anchors.rightMargin
214 fontSize: "small"
233 fontSize: "small"
215 textFormat: Text.StyledText
234 textFormat: Text.StyledText
@@ -225,10 +244,10 @@ Item {
225 objectName: "passwordInput"
244 objectName: "passwordInput"
226 anchors {
245 anchors {
227 bottom: highlightItem.bottom
246 bottom: highlightItem.bottom
228− horizontalCenter: parent.horizontalCenter
247+ horizontalCenter: highlightItem.horizontalCenter
229− margins: units.gu(1)
248+ margins: units.gu(2)
231− width: parent.width - anchors.margins * 2
250+ width: highlightItem.width - anchors.margins * 2
232 opacity: userList.movingInternally ? 0 : 1
251 opacity: userList.movingInternally ? 0 : 1
234 isPrompt: root.wasPrompted
253 isPrompt: root.wasPrompted