import QtQuick import QtQuick.Controls import QtQuick.Layouts import Logos.Theme import Logos.Controls // Modal shown before applying a setting that only takes effect after a restart. // The caller handles `confirmed` (persist the change, then close the app). Popup { id: root property string title: qsTr("Restart required") property string message: "" property string confirmLabel: qsTr("Save & close") signal confirmed() modal: true dim: true padding: Theme.spacing.large closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside // Center on the full-window overlay rather than the small control this is // declared inside. parent: Overlay.overlay anchors.centerIn: parent width: 360 background: Rectangle { color: Theme.palette.backgroundSecondary radius: Theme.spacing.radiusXlarge border.color: Theme.palette.backgroundElevated } contentItem: ColumnLayout { width: root.availableWidth spacing: Theme.spacing.large LogosText { text: root.title font.pixelSize: Theme.typography.titleText font.weight: Theme.typography.weightBold color: Theme.palette.text } LogosText { Layout.fillWidth: true text: root.message wrapMode: Text.WordWrap font.pixelSize: Theme.typography.secondaryText color: Theme.palette.textSecondary } RowLayout { Layout.topMargin: Theme.spacing.medium Layout.fillWidth: true spacing: Theme.spacing.medium LogosButton { text: qsTr("Cancel") Layout.fillWidth: true onClicked: root.close() } LogosButton { text: root.confirmLabel Layout.fillWidth: true onClicked: { root.confirmed() root.close() } } } } }