Skip to content

Commit 380378d

Browse files
jarolrodhebasto
authored andcommitted
qml: refactor initerror window
refactor initerror window to adhere to designers specification Github-Pull: #164 Rebased-From: 86fde6b
1 parent 7205d5e commit 380378d

File tree

2 files changed

+26
-12
lines changed

2 files changed

+26
-12
lines changed

src/qml/BitcoinApp/bitcoin.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ bool InitErrorMessageBox(
5858
[[maybe_unused]] unsigned int style)
5959
{
6060
QQmlApplicationEngine engine;
61+
engine.addImportPath(QStringLiteral(":/qt/qml"));
6162
engine.rootContext()->setContextProperty("message", QString::fromStdString(message.translated));
6263
engine.load(QUrl(QStringLiteral("qrc:/qt/qml/BitcoinApp/initerrormessage.qml")));
6364
if (engine.rootObjects().isEmpty()) {

src/qml/BitcoinApp/initerrormessage.qml

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,35 @@
44

55
import QtQuick
66
import QtQuick.Controls
7+
import QtQuick.Layouts
8+
import BitcoinApp.Controls
79

810
ApplicationWindow {
9-
title: "Bitcoin Core TnG"
11+
id: root
1012
visible: true
13+
title: "Bitcoin Core App"
1114
minimumWidth: 500
12-
minimumHeight: 200
15+
minimumHeight: 250
16+
color: Theme.color.background
17+
ColumnLayout {
18+
spacing: 30
19+
anchors.top: parent.top
20+
anchors.horizontalCenter: parent.horizontalCenter
21+
width: 340
1322

14-
Dialog {
15-
anchors.centerIn: parent
16-
title: qsTr("Error")
17-
contentItem:
18-
Label {
19-
text: message
20-
}
21-
visible: true
22-
standardButtons: Dialog.Ok
23-
onAccepted: Qt.quit()
23+
Header {
24+
Layout.topMargin: 30
25+
Layout.fillWidth: true
26+
bold: true
27+
header: qsTr("There was an issue starting up.")
28+
headerSize: 21
29+
description: message
30+
descriptionMargin: 3
31+
}
32+
OutlineButton {
33+
Layout.alignment: Qt.AlignCenter
34+
text: qsTr("Close")
35+
onClicked: Qt.quit()
36+
}
2437
}
2538
}

0 commit comments

Comments
 (0)