on xenial help sign in
tentative fix for fullscreen snaps
commit571fb62b9fe3724b3cc48359a95f247e2a8d5d72 authorLukáš Tinkl <lukas.tinkl@canonical.com> dateFri 13 May 2016, 21:42 (10 years ago) parent25380459fdbc31
2 files changed+13−6
qml/Notifications/Notification.qml+3 qml/Notifications/Notifications.qml+10−6
qml/Notifications/Notification.qml+3
@@ -414,6 +414,9 @@ StyledItem {
414414
415415 onLoaded: {
416416 notification.fullscreen = Qt.binding(function() { return fullscreen; });
417+ if (notification.fullscreen) {
418+ ListView.view.currentIndex = index
419+ }
417420 }
418421 onAccepted: {
419422 notification.notification.invokeAction(actionRepeater.itemAt(0).actionId)
qml/Notifications/Notifications.qml+10−6
@@ -69,13 +69,17 @@ ListView {
6969 // FIXME: disabled all transitions because of LP: #1354406 workaround
7070 //layer.enabled: add.running || remove.running || populate.running
7171
72− Component.onCompleted: {
73− if (index == 1) {
74− notificationList.topmostIsFullscreen = fullscreen
72+ readonly property int theIndex: index
73+ onTheIndexChanged: updateListTopMostIsFullscreen();
74+ Component.onCompleted: updateListTopMostIsFullscreen();
75+ onFullscreenChanged: updateListTopMostIsFullscreen();
76+
77+ function updateListTopMostIsFullscreen() {
78+ if (fullscreen) { // effectively hide any non-fullscreen snaps
79+ notificationList.positionViewAtIndex(index, ListView.Beginning);
80+ } else {
81+ notificationList.positionViewAtBeginning();
7582 }
76− }
77−
78− onFullscreenChanged: {
7983 // index 1 because 0 is the PlaceHolder...
8084 if (index == 1) {
8185 notificationList.topmostIsFullscreen = fullscreen