2021-09-09 12:18:22 +03:00
|
|
|
import QtQuick 2.15
|
2022-06-08 03:30:22 +03:00
|
|
|
import QtQuick.Controls 2.15
|
2021-09-09 12:18:22 +03:00
|
|
|
|
2021-09-09 14:33:57 +03:00
|
|
|
import Style 1.0
|
|
|
|
|
2021-09-09 12:18:22 +03:00
|
|
|
Item {
|
|
|
|
id: errorBox
|
|
|
|
|
|
|
|
property var text: ""
|
2021-09-09 14:33:57 +03:00
|
|
|
|
|
|
|
property color color: Style.errorBoxTextColor
|
|
|
|
property color backgroundColor: Style.errorBoxBackgroundColor
|
|
|
|
property color borderColor: Style.errorBoxBorderColor
|
2021-09-09 12:18:22 +03:00
|
|
|
|
|
|
|
implicitHeight: errorMessage.implicitHeight + 2 * 8
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
anchors.fill: parent
|
2021-09-09 14:33:57 +03:00
|
|
|
color: errorBox.backgroundColor
|
|
|
|
border.color: errorBox.borderColor
|
2021-09-09 12:18:22 +03:00
|
|
|
}
|
|
|
|
|
2022-06-08 03:30:22 +03:00
|
|
|
Label {
|
2021-09-09 12:18:22 +03:00
|
|
|
id: errorMessage
|
|
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
anchors.margins: 8
|
|
|
|
width: parent.width
|
2021-09-09 14:33:57 +03:00
|
|
|
color: errorBox.color
|
2021-09-09 12:18:22 +03:00
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
text: errorBox.text
|
2022-09-15 15:56:02 +03:00
|
|
|
textFormat: Text.PlainText
|
2021-09-09 12:18:22 +03:00
|
|
|
}
|
|
|
|
}
|