on xenial help sign in
fix the height for contracted snaps
da8f584Lukáš Tinkl
qml/Notifications/Notification.qml+4−2
@@ -49,7 +49,9 @@ StyledItem {
49 property url background: ""
49 property url background: ""
50
50
51 objectName: "background"
51 objectName: "background"
52− implicitHeight: type !== Notification.PlaceHolder ? (fullscreen ? maxHeight : outterColumn.height + margins * 2) : 0
52+ implicitHeight: type !== Notification.PlaceHolder ? (fullscreen ? maxHeight :
53+ outterColumn.height + margins + (state !== "contracted" ? + margins : 0))
54+ : 0
53
55
54 // FIXME: non-zero initially because of LP: #1354406 workaround, we want this to start at 0 upon creation eventually
56 // FIXME: non-zero initially because of LP: #1354406 workaround, we want this to start at 0 upon creation eventually
55 opacity: defaultOpacity - Math.abs(x / notification.width)
57 opacity: defaultOpacity - Math.abs(x / notification.width)
@@ -308,7 +310,7 @@ StyledItem {
308 name: "go-down"
310 name: "go-down"
309 visible: type === Notification.SnapDecision && notification.state === "contracted"
311 visible: type === Notification.SnapDecision && notification.state === "contracted"
310 width: height
312 width: height
311− height: visible ? units.gu(1.5) : 0
313+ height: units.gu(1.5)
312 anchors.horizontalCenter: parent.horizontalCenter
314 anchors.horizontalCenter: parent.horizontalCenter
313 color: theme.palette.normal.backgroundTertiaryText
315 color: theme.palette.normal.backgroundTertiaryText
314 }
316 }
tests/qmltests/Notifications/tst_Notifications.qml+1−1
@@ -615,7 +615,7 @@ Item {
615 var n = findChild(notifications, "notification" + i)
615 var n = findChild(notifications, "notification" + i)
616 waitForRendering(n);
616 waitForRendering(n);
617 var outterColumn = findChild(n, "outterColumn");
617 var outterColumn = findChild(n, "outterColumn");
618− tryCompare(n, "height", outterColumn.height + n.margins * 2);
618+ tryCompare(n, "height", outterColumn.height + n.margins + (n.state !== "contracted" ? + n.margins : 0));
619 }
619 }
620
620
621 if (data.hasSound) {
621 if (data.hasSound) {