on xenial help sign in
Switch to light theme, adjust sizing
5fa7bc4Michael Terry
qml/Greeter/GreeterPrompt.qml+15−24
@@ -19,7 +19,7 @@ import Ubuntu.Components 1.3
19
19
20FocusScope {
20FocusScope {
21 id: root
21 id: root
22− implicitHeight: units.gu(4)
22+ implicitHeight: units.gu(5)
23
23
24 property bool isPrompt
24 property bool isPrompt
25 property bool isAlphanumeric
25 property bool isAlphanumeric
@@ -40,10 +40,12 @@ FocusScope {
40 id: d
40 id: d
41
41
42 property bool enabled: true
42 property bool enabled: true
43+ readonly property color textColor: passwordInput.enabled ? theme.palette.normal.raisedText
44+ : theme.palette.disabled.raisedText
43− readonly property color color: passwordInput.enabled ? theme.palette.normal.backgroundText
45+ readonly property color selectedColor: passwordInput.enabled ? theme.palette.normal.raised
44− : theme.palette.disabled.backgroundText
46+ : theme.palette.disabled.raised
45− readonly property color inverseColor: passwordInput.enabled ? theme.palette.normal.background
47+ readonly property color drawColor: passwordInput.enabled ? theme.palette.normal.raisedSecondaryText
46− : theme.palette.disabled.background
48+ : theme.palette.disabled.raisedSecondaryText
47 readonly property color errorColor: passwordInput.enabled ? theme.palette.normal.negative
49 readonly property color errorColor: passwordInput.enabled ? theme.palette.normal.negative
48 : theme.palette.disabled.negative
50 : theme.palette.disabled.negative
49 }
51 }
@@ -51,7 +53,7 @@ FocusScope {
51 Rectangle {
53 Rectangle {
52 anchors.fill: parent
54 anchors.fill: parent
53 border.width: units.dp(1)
55 border.width: units.dp(1)
54− border.color: d.color
56+ border.color: d.drawColor
55 radius: units.gu(0.5)
57 radius: units.gu(0.5)
56 color: "transparent"
58 color: "transparent"
57 }
59 }
@@ -66,7 +68,7 @@ FocusScope {
66
68
67 Label {
69 Label {
68 anchors.centerIn: parent
70 anchors.centerIn: parent
69− color: d.color
71+ color: d.textColor
70 text: root.text
72 text: root.text
71 }
73 }
72 }
74 }
@@ -84,37 +86,26 @@ FocusScope {
84 hasClearButton: false
86 hasClearButton: false
85
87
86 style: Item {
88 style: Item {
87− property color color: d.color
89+ property color color: d.textColor
88− property color selectedTextColor: d.inverseColor
90+ property color selectedTextColor: d.selectedColor
89− property color selectionColor: d.color
91+ property color selectionColor: d.textColor
90 property color borderColor: "transparent"
92 property color borderColor: "transparent"
91 property color backgroundColor: "transparent"
93 property color backgroundColor: "transparent"
92 property color errorColor: d.errorColor
94 property color errorColor: d.errorColor
93 property real frameSpacing: units.gu(0.5)
95 property real frameSpacing: units.gu(0.5)
94 anchors.fill: parent
96 anchors.fill: parent
95−
96− Rectangle {
97− anchors.fill: parent
98− color: "white"
99− opacity: 0.1
100− }
101 }
97 }
102
98
103 secondaryItem: [
99 secondaryItem: [
104 Icon {
100 Icon {
105 name: "keyboard-caps-enabled"
101 name: "keyboard-caps-enabled"
106− height: units.gu(2)
102+ height: units.gu(3)
107− width: units.gu(2)
103+ width: units.gu(3)
108− color: d.color
104+ color: d.textColor
109 visible: root.isSecret && false // TODO: detect when caps lock is on
105 visible: root.isSecret && false // TODO: detect when caps lock is on
110 }
106 }
111 ]
107 ]
112
108
113− cursorDelegate: Rectangle {
114− width: units.dp(1)
115− color: d.color
116− }
117−
118 onAccepted: {
109 onAccepted: {
119 if (!enabled)
110 if (!enabled)
120 return;
111 return;
qml/Greeter/LoginList.qml+31−12
@@ -15,10 +15,11 @@
15 */
15 */
16
16
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"
20
21
21−Item {
22+StyledItem {
22 id: root
23 id: root
23
24
24 property alias model: userList.model
25 property alias model: userList.model
@@ -28,7 +29,7 @@ Item {
28
29
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
84 }
85 }
85
86
87+ theme.name: "Ubuntu.Components.Themes.Ambiance"
88+
86 Keys.onEscapePressed: {
89 Keys.onEscapePressed: {
87 selected(currentIndex);
90 selected(currentIndex);
88 }
91 }
@@ -91,16 +94,30 @@ Item {
91 userList.currentIndex = currentIndex;
94 userList.currentIndex = currentIndex;
92 }
95 }
93
96
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+
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
100 }
117 }
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
104 }
121 }
105
122
106 ListView {
123 ListView {
@@ -108,6 +125,8 @@ Item {
108 objectName: "userList"
125 objectName: "userList"
109
126
110 anchors.fill: parent
127 anchors.fill: parent
128+ anchors.leftMargin: units.gu(2)
129+ anchors.rightMargin: units.gu(2)
111
130
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 {
158
177
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))
167 }
186 }
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
170
189
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; } }
172 }
191 }
@@ -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)
210 }
229 }
211
230
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)
230 }
249 }
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
233
252
234 isPrompt: root.wasPrompted
253 isPrompt: root.wasPrompted
qml/Greeter/WideView.qml+1−1
@@ -121,7 +121,7 @@ FocusScope {
121 leftMargin: Math.min(parent.width * 0.16, units.gu(20))
121 leftMargin: Math.min(parent.width * 0.16, units.gu(20))
122 top: parent.top
122 top: parent.top
123 }
123 }
124− width: units.gu(29)
124+ width: units.gu(40)
125 height: inputMethod && inputMethod.visible ? parent.height - inputMethod.keyboardRectangle.height
125 height: inputMethod && inputMethod.visible ? parent.height - inputMethod.keyboardRectangle.height
126 : parent.height
126 : parent.height
127 Behavior on height { UbuntuNumberAnimation {} }
127 Behavior on height { UbuntuNumberAnimation {} }