// Transient messages, bottom centre, on an ink slab. import QtQuick import QtQuick.Controls import ".." Popup { id: snackbar property string message: "" function show(text) { message = text open() timer.restart() } x: Math.round((parent.width - width) / 2) y: parent.height - height - 28 width: Math.min(parent.width - 48, Math.max(240, label.implicitWidth + 36)) padding: 14 modal: false focus: false closePolicy: Popup.NoAutoClose background: Rectangle { color: Theme.ink radius: 10 } contentItem: Label { id: label text: snackbar.message color: Theme.paper font.pixelSize: 13 font.family: Theme.sansFamily wrapMode: Text.WordWrap } Timer { id: timer; interval: 5000; onTriggered: snackbar.close() } }