on xenial help sign in
Made notification qml-test pass again. Added FIXME-remarks regarding currently used workaround for LP: #1354406. Avoid some QWARNs.
8eba0b8Mirco Müller
qml/Notifications/Notification.qml+4−3
@@ -52,7 +52,7 @@ Item {
52 implicitHeight: type !== Notification.PlaceHolder ? (fullscreen ? maxHeight : contentColumn.height + contentColumn.spacing * 2) : 0
52 implicitHeight: type !== Notification.PlaceHolder ? (fullscreen ? maxHeight : contentColumn.height + contentColumn.spacing * 2) : 0
53
53
54 color: Qt.rgba(0.132, 0.117, 0.109, 0.97)
54 color: Qt.rgba(0.132, 0.117, 0.109, 0.97)
55− opacity: 1
55+ opacity: 1 // FIXME: 1 because of LP: #1354406 workaround, has to be 0 really
56
56
57 state: {
57 state: {
58 var result = "";
58 var result = "";
@@ -82,7 +82,8 @@ Item {
82 source: hints["suppress-sound"] != "true" && hints["sound-file"] != undefined ? hints["sound-file"] : ""
82 source: hints["suppress-sound"] != "true" && hints["sound-file"] != undefined ? hints["sound-file"] : ""
83 }
83 }
84
84
85− onOpacityChanged: {
85+ // FIXME: using onCompleted because of LP: #1354406 workaround, has to be onOpacityChanged really
86+ Component.onCompleted: {
86 if (opacity == 1.0 && hints["suppress-sound"] != "true" && sound.source) {
87 if (opacity == 1.0 && hints["suppress-sound"] != "true" && sound.source) {
87 sound.play();
88 sound.play();
88 }
89 }
@@ -380,7 +381,7 @@ Item {
380 id: comboRepeater
381 id: comboRepeater
381
382
382 onVisibleChanged: {
383 onVisibleChanged: {
383− comboButton.text = comboRepeater.itemAt(2).actionLabel
384+ comboButton.text = comboRepeater.count >= 3 ? comboRepeater.itemAt(2).actionLabel : ""
384 }
385 }
385
386
386 model: notification.actions
387 model: notification.actions
qml/Notifications/Notifications.qml+3−1
@@ -63,7 +63,8 @@ ListView {
63
63
64 // make sure there's no opacity-difference between the several
64 // make sure there's no opacity-difference between the several
65 // elements in a notification
65 // elements in a notification
66+ // FIXME: disabled all transitions because of LP: #1354406 workaround
66− layer.enabled: add.running || remove.running || populate.running
67+ //layer.enabled: add.running || remove.running || populate.running
67
68
68 Component.onCompleted: {
69 Component.onCompleted: {
69 if (index == 1) {
70 if (index == 1) {
@@ -79,6 +80,7 @@ ListView {
79 }
80 }
80 }
81 }
81
82
83+ // FIXME: disabled all transitions because of LP: #1354406 workaround
82 /*populate: Transition {
84 /*populate: Transition {
83 UbuntuNumberAnimation {
85 UbuntuNumberAnimation {
84 property: "opacity"
86 property: "opacity"