on xenial help sign in
Made the separator/divider line go across the whole width of a snap-decision notification... and fixed all layouts that got broken in the progress.
844d236Mirco Müller
qml/Notifications/Notification.qml+19−10
@@ -43,9 +43,11 @@ Item {
43 readonly property color green: "#3fb24f"
43 readonly property color green: "#3fb24f"
44 readonly property color sdLightGrey: "#eaeaea"
44 readonly property color sdLightGrey: "#eaeaea"
45 readonly property color sdDarkGrey: "#dddddd"
45 readonly property color sdDarkGrey: "#dddddd"
46+ readonly property color sdFontColor: "#5d5d5d"
47+ readonly property real contentSpacing: units.gu(2)
46
48
47 objectName: "background"
49 objectName: "background"
48− implicitHeight: type !== Notification.PlaceHolder ? (fullscreen ? maxHeight : contentColumn.height + contentColumn.spacing * 2) : 0
50+ implicitHeight: type !== Notification.PlaceHolder ? (fullscreen ? maxHeight : outterColumn.height + contentSpacing * 2) : 0
49
51
50 color: type == Notification.SnapDecision ? sdLightGrey : Qt.rgba(0.132, 0.117, 0.109, 0.97)
52 color: type == Notification.SnapDecision ? sdLightGrey : Qt.rgba(0.132, 0.117, 0.109, 0.97)
51 opacity: 0
53 opacity: 0
@@ -194,14 +196,14 @@ Item {
194 }
196 }
195
197
196 Column {
198 Column {
197− id: contentColumn
199+ id: outterColumn
198− objectName: "contentColumn"
199
200
200 anchors {
201 anchors {
201 left: parent.left
202 left: parent.left
202 right: parent.right
203 right: parent.right
203 top: parent.top
204 top: parent.top
204− margins: fullscreen ? 0 : spacing
205+ margins: 0
206+ topMargin: units.gu(2)
205 }
207 }
206
208
207 spacing: units.gu(2)
209 spacing: units.gu(2)
@@ -209,10 +211,11 @@ Item {
209 Row {
211 Row {
210 id: topRow
212 id: topRow
211
213
212− spacing: contentColumn.spacing
214+ spacing: contentSpacing
213 anchors {
215 anchors {
214 left: parent.left
216 left: parent.left
215 right: parent.right
217 right: parent.right
218+ margins: contentSpacing
216 }
219 }
217
220
218 ShapedIcon {
221 ShapedIcon {
@@ -240,8 +243,7 @@ Item {
240 right: parent.right
243 right: parent.right
241 }
244 }
242 fontSize: "medium"
245 fontSize: "medium"
243− font.bold: true
244− color: type == Notification.SnapDecision ? "#5d5d5d" :Theme.palette.selected.backgroundText
246+ color: type == Notification.SnapDecision ? sdFontColor :Theme.palette.selected.backgroundText
245 elide: Text.ElideRight
247 elide: Text.ElideRight
246 }
248 }
247
249
@@ -255,7 +257,7 @@ Item {
255 }
257 }
256 visible: body != ""
258 visible: body != ""
257 fontSize: "small"
259 fontSize: "small"
258− color: type == Notification.SnapDecision ? "#5d5d5d" : Theme.palette.selected.backgroundText
260+ color: type == Notification.SnapDecision ? sdFontColor : Theme.palette.selected.backgroundText
259 opacity: type == Notification.SnapDecision ? 1.0 : 0.6
261 opacity: type == Notification.SnapDecision ? 1.0 : 0.6
260 wrapMode: Text.WordWrap
262 wrapMode: Text.WordWrap
261 maximumLineCount: 10
263 maximumLineCount: 10
@@ -275,7 +277,7 @@ Item {
275 }
277 }
276
278
277 ListItem.ThinDivider {
279 ListItem.ThinDivider {
278− visible: type == Notification.SnapDecision
280+ visible: type == Notification.SnapDecision
279 }
281 }
280
282
281 Column {
283 Column {
@@ -322,6 +324,7 @@ Item {
322 anchors {
324 anchors {
323 left: parent.left
325 left: parent.left
324 right: parent.right
326 right: parent.right
327+ margins: contentSpacing
325 }
328 }
326 visible: notification.type == Notification.SnapDecision && actionRepeater.count > 0
329 visible: notification.type == Notification.SnapDecision && actionRepeater.count > 0
327 spacing: units.gu(2)
330 spacing: units.gu(2)
@@ -342,7 +345,7 @@ Item {
342
345
343 Button {
346 Button {
344 objectName: "button" + index
347 objectName: "button" + index
345− width: buttonRow.width / 2 - spacing
348+ width: buttonRow.width / 2 - spacing*2
346 text: loader.actionLabel
349 text: loader.actionLabel
347 color: {
350 color: {
348 var result = sdDarkGrey;
351 var result = sdDarkGrey;
@@ -367,6 +370,12 @@ Item {
367
370
368 objectName: "button2"
371 objectName: "button2"
369 width: parent.width
372 width: parent.width
373+ anchors {
374+ left: parent.left
375+ right: parent.right
376+ margins: contentSpacing
377+ }
378+
370 visible: notification.type == Notification.SnapDecision && actionRepeater.count > 3
379 visible: notification.type == Notification.SnapDecision && actionRepeater.count > 3
371 color: sdDarkGrey
380 color: sdDarkGrey
372 onClicked: notification.notification.invokeAction(comboRepeater.itemAt(2).actionId)
381 onClicked: notification.notification.invokeAction(comboRepeater.itemAt(2).actionId)
qml/Notifications/NotificationMenuItemFactory.qml+3
@@ -53,6 +53,7 @@ Loader {
53 anchors {
53 anchors {
54 left: parent.left
54 left: parent.left
55 right: parent.right
55 right: parent.right
56+ margins: spacing
56 }
57 }
57
58
58 Component.onCompleted: {
59 Component.onCompleted: {
@@ -63,6 +64,7 @@ Loader {
63
64
64 Label {
65 Label {
65 text: menuData.label
66 text: menuData.label
67+ color: notification.sdFontColor //"#5d5d5d"
66 }
68 }
67
69
68 TextField {
70 TextField {
@@ -95,6 +97,7 @@ Loader {
95 Label {
97 Label {
96 anchors.verticalCenter: checkBox.verticalCenter
98 anchors.verticalCenter: checkBox.verticalCenter
97 text: i18n.tr("Show password")
99 text: i18n.tr("Show password")
100+ color: notification.sdFontColor //"#5d5d5d"
98 }
101 }
99 }
102 }
100 }
103 }