-
Notifications
You must be signed in to change notification settings - Fork 0
/
Errors.qml
73 lines (58 loc) · 1.61 KB
/
Errors.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import QtQuick 2.0
import QtQuick.Controls 2.2
Item {
id:container
anchors.fill: parent
objectName: "errorContainer"
Image{
id:bugImg
x: container.width - sourceSize.width -12
y:container.height - sourceSize.height - 12
source: "/assets/bug.png"
fillMode: Image.Pad
sourceSize.width: 40
sourceSize.height: 40
visible: fileWatcher.errorMsg.length > 0
Rectangle {
width: parent.width / 3
height: parent.height / 3
radius: width / 2
color:"red"
}
MouseArea {
anchors.fill: parent
drag.target: bugImg
drag.axis: Drag.XAndYAxis
drag.minimumX: 0
drag.maximumX: container.width - bugImg.width
drag.minimumY: 0
drag.maximumY: container.height - bugImg.height
onClicked: {
errorContainer.visible = !errorContainer.visible
}
}
}
Rectangle {
id:errorContainer
visible: (fileWatcher.errorMsg.length > 0)
anchors.fill: parent
anchors.margins: 24
color: "lightgrey"
Button {
id:closeBtn
text: "X"
anchors.right: parent.right
onClicked: {
errorContainer.visible = false
}
}
Label {
id: errorMsgLbl
anchors.top: closeBtn.bottom
anchors.margins: 12
width: parent.width
wrapMode: Label.WordWrap
text: fileWatcher.errorMsg
}
}
}