import QtQuick import QtQuick.Controls.Basic import Asteria Rectangle { id: root color: ThemeManager.currentTheme.overlayBg visible: Book.errorMessage !== "" MouseArea { anchors.fill: parent onClicked: {} // Block clicks through overlay } Rectangle { anchors.centerIn: parent width: Math.min(root.width * 0.7, 440) height: dialogColumn.implicitHeight + 48 color: ThemeManager.currentTheme.surface radius: 8 Column { id: dialogColumn spacing: 20 anchors { top: parent.top left: parent.left right: parent.right topMargin: 24 leftMargin: 24 rightMargin: 24 } Text { width: parent.width text: Book.errorMessage font.pixelSize: 15 color: ThemeManager.currentTheme.readingText horizontalAlignment: Text.AlignHCenter wrapMode: Text.Wrap } Button { id: okButton anchors.horizontalCenter: parent.horizontalCenter text: "Ok" contentItem: Text { text: okButton.text font.pixelSize: 14 color: "#ffffff" horizontalAlignment: Text.AlignHCenter } background: Rectangle { implicitWidth: 80 implicitHeight: 36 radius: 4 color: okButton.hovered ? Qt.lighter(ThemeManager.currentTheme.primaryAccent, 1.15) : ThemeManager.currentTheme.primaryAccent } onClicked: Book.clearError() } } } }