blob: 8ef5d053c8318e50c84ff831a396a91d8422bb56 (
plain)
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
|
import QtQuick 2.15
import Style 1.0
Item {
id: errorBox
property var text: ""
property color color: Style.errorBoxTextColor
property color backgroundColor: Style.errorBoxBackgroundColor
property color borderColor: Style.errorBoxBorderColor
implicitHeight: errorMessage.implicitHeight + 2 * 8
Rectangle {
anchors.fill: parent
color: errorBox.backgroundColor
border.color: errorBox.borderColor
}
Text {
id: errorMessage
anchors.fill: parent
anchors.margins: 8
width: parent.width
color: errorBox.color
wrapMode: Text.WordWrap
text: errorBox.text
}
}
|