on xenial help sign in
fix the height for contracted snaps
commitda8f584a0c90313e0478937e81a68ad5f8906415 authorLukáš Tinkl <lukas.tinkl@canonical.com> dateWed 6 Apr 2016, 14:35 (11 years ago) parent02fba25
2 files changed+5−3
qml/Notifications/Notification.qml+4−2 tests/qmltests/Notifications/tst_Notifications.qml+1−1
qml/Notifications/Notification.qml+4−2
@@ -49,7 +49,9 @@ StyledItem {
4949 property url background: ""
5050
5151 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
5355
5456 // FIXME: non-zero initially because of LP: #1354406 workaround, we want this to start at 0 upon creation eventually
5557 opacity: defaultOpacity - Math.abs(x / notification.width)
@@ -308,7 +310,7 @@ StyledItem {
308310 name: "go-down"
309311 visible: type === Notification.SnapDecision && notification.state === "contracted"
310312 width: height
311− height: visible ? units.gu(1.5) : 0
313+ height: units.gu(1.5)
312314 anchors.horizontalCenter: parent.horizontalCenter
313315 color: theme.palette.normal.backgroundTertiaryText
314316 }
tests/qmltests/Notifications/tst_Notifications.qml+1−1
@@ -615,7 +615,7 @@ Item {
615615 var n = findChild(notifications, "notification" + i)
616616 waitForRendering(n);
617617 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));
619619 }
620620
621621 if (data.hasSound) {