File tree Expand file tree Collapse file tree 2 files changed +70
-12
lines changed Expand file tree Collapse file tree 2 files changed +70
-12
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ bool InitErrorMessageBox(
67
67
{
68
68
QQmlApplicationEngine engine;
69
69
engine.rootContext ()->setContextProperty (" message" , QString::fromStdString (message.translated ));
70
+ engine.addImageProvider (QStringLiteral (" images" ), new ImageProvider{NULL });
70
71
engine.load (QUrl (QStringLiteral (" qrc:///qml/pages/initerrormessage.qml" )));
71
72
if (engine.rootObjects ().isEmpty ()) {
72
73
return EXIT_FAILURE;
Original file line number Diff line number Diff line change 4
4
5
5
import QtQuick 2.15
6
6
import QtQuick.Controls 2.15
7
+ import QtQuick.Layouts 1.15
8
+ import "../controls"
7
9
8
10
ApplicationWindow {
9
- title : " Bitcoin Core TnG "
11
+ id : root
10
12
visible: true
11
13
minimumWidth: 500
12
- minimumHeight: 200
14
+ minimumHeight: 250
15
+ color: " transparent"
16
+ flags: Qt .FramelessWindowHint
17
+ background: Rectangle {
18
+ color: Theme .color .background
19
+ radius: 10
20
+ }
21
+ menuBar: RowLayout {
22
+ width: parent .width
23
+ height: 55
24
+
25
+ DragHandler {
26
+ id: menuHandler
27
+ grabPermissions: TapHandler .CanTakeOverFromAnything
28
+ onActiveChanged: if (active) { root .startSystemMove (); }
29
+ target: null
30
+ }
31
+ Rectangle {
32
+ width: 55
33
+ color: " green"
34
+ }
35
+ Header {
36
+ Layout .fillWidth : true
37
+ Layout .alignment : Qt .AlignCenter
38
+ bold: true
39
+ header: " Error"
40
+ headerSize: 24
41
+ }
42
+ Button {
43
+ id: icon_button
44
+ implicitWidth: 55
45
+ icon .source : " image://images/cross"
46
+ icon .color : Theme .color .neutral9
47
+ icon .width : 20
48
+ background: null
49
+ onClicked: Qt .quit ()
50
+ }
51
+ }
52
+
53
+ DragHandler {
54
+ id: moveHandler
55
+ grabPermissions: TapHandler .CanTakeOverFromAnything
56
+ onActiveChanged: if (active) { root .startSystemMove (); }
57
+ target: null
58
+ }
59
+ Rectangle {
60
+ anchors .bottom : root .menuBar .bottom
61
+ width: root .width
62
+ height: 1
63
+ color: Theme .color .neutral5
64
+ }
65
+ ColumnLayout {
66
+ spacing: 30
67
+ anchors .top : parent .top
68
+ anchors .horizontalCenter : parent .horizontalCenter
13
69
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 ()
70
+ Header {
71
+ Layout .topMargin : 30
72
+ Layout .fillWidth : true
73
+ header: message
74
+ headerSize: 18
75
+ }
76
+ OutlineButton {
77
+ Layout .alignment : Qt .AlignCenter
78
+ text: " OK"
79
+ onClicked: Qt .quit ()
80
+ }
24
81
}
25
82
}
You can’t perform that action at this time.
0 commit comments