@@ -15,10 +15,11 @@
1515 */
1616
1717import QtQuick 2.4
18+import QtGraphicalEffects 1.0
1819import Ubuntu.Components 1.3
1920import "../Components"
2021
21−Item {
22+StyledItem {
2223 id: root
2324
2425 property alias model: userList.model
@@ -28,7 +29,7 @@ Item {
2829
2930 readonly property int numAboveBelow: 4
3031 readonly property int cellHeight: units.gu(5)
31− readonly property int highlightedHeight: units.gu(10)
32+ readonly property int highlightedHeight: units.gu(15)
3233 readonly property int moveDuration: 200
3334 readonly property string currentUser: userList.currentItem.username
3435 property bool wasPrompted: false
@@ -83,6 +84,8 @@ Item {
8384 property string promptText
8485 }
8586
87+ theme.name: "Ubuntu.Components.Themes.Ambiance"
88+
8689 Keys.onEscapePressed: {
8790 selected(currentIndex);
8891 }
@@ -91,16 +94,30 @@ Item {
9194 userList.currentIndex = currentIndex;
9295 }
9396
97+ BorderImage {
98+ anchors {
99+ fill: highlightItem
100+ topMargin: -units.gu(1)
101+ leftMargin: -units.gu(1.5)
102+ rightMargin: -units.gu(1.5)
103+ bottomMargin: -units.gu(1.5)
104+ }
105+ source: "../Stages/graphics/dropshadow2gu.sci"
106+ opacity: 0.35
107+ }
108+
94109 UbuntuShape {
95110 id: highlightItem
96111 anchors {
97112 left: parent.left
113+ leftMargin: units.gu(2)
98114 right: parent.right
115+ rightMargin: units.gu(2)
99116 verticalCenter: parent.verticalCenter
100117 }
101118 height: root.highlightedHeight
102119 aspect: UbuntuShape.Flat
103− backgroundColor: Qt.rgba(0, 0, 0, 0.4)
120+ backgroundColor: theme.palette.normal.raised
104121 }
105122
106123 ListView {
@@ -108,6 +125,8 @@ Item {
108125 objectName: "userList"
109126
110127 anchors.fill: parent
128+ anchors.leftMargin: units.gu(2)
129+ anchors.rightMargin: units.gu(2)
111130
112131 preferredHighlightBegin: userList.height / 2 - root.highlightedHeight / 2
113132 preferredHighlightEnd: userList.height / 2 - root.highlightedHeight / 2
@@ -158,15 +177,15 @@ Item {
158177
159178 anchors {
160179 left: parent.left
161− leftMargin: units.gu(1)
180+ leftMargin: units.gu(2)
162181 right: parent.right
163− rightMargin: units.gu(1)
182+ rightMargin: units.gu(2)
164183 bottom: parent.top
165184 // 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))
167186 }
168187 text: realName
169− color: theme.palette.normal.backgroundText
188+ color: userList.currentIndex !== index ? theme.palette.normal.raised : theme.palette.normal.raisedText
170189
171190 Behavior on anchors.topMargin { NumberAnimation { duration: root.moveDuration; easing.type: Easing.InOutQuad; } }
172191 }
@@ -202,14 +221,14 @@ Item {
202221 objectName: "infoLabel"
203222 anchors {
204223 bottom: passwordInput.top
205− left: parent.left
224+ left: highlightItem.left
206225 topMargin: units.gu(1)
207226 bottomMargin: units.gu(1)
208227 leftMargin: units.gu(2)
209228 rightMargin: units.gu(1)
210229 }
211230
212− color: theme.palette.normal.backgroundText
231+ color: theme.palette.normal.raisedText
213232 width: root.width - anchors.leftMargin - anchors.rightMargin
214233 fontSize: "small"
215234 textFormat: Text.StyledText
@@ -225,10 +244,10 @@ Item {
225244 objectName: "passwordInput"
226245 anchors {
227246 bottom: highlightItem.bottom
228− horizontalCenter: parent.horizontalCenter
229− margins: units.gu(1)
247+ horizontalCenter: highlightItem.horizontalCenter
248+ margins: units.gu(2)
230249 }
231− width: parent.width - anchors.margins * 2
250+ width: highlightItem.width - anchors.margins * 2
232251 opacity: userList.movingInternally ? 0 : 1
233252
234253 isPrompt: root.wasPrompted