2019-04-11 01:17:29 +00:00
|
|
|
import QtQuick 2.9
|
2018-08-05 20:54:11 +00:00
|
|
|
import QtQuick.Layouts 1.1
|
|
|
|
import QtQuick.Controls 2.0
|
|
|
|
|
|
|
|
import "." as MoneroComponents
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
id: root
|
|
|
|
property alias text: content.text
|
2018-12-30 07:07:14 +00:00
|
|
|
property alias textColor: content.color
|
2019-04-25 19:09:23 +00:00
|
|
|
property int fontSize: 15
|
2018-08-05 20:54:11 +00:00
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.preferredHeight: warningLayout.height
|
|
|
|
|
2019-04-11 01:17:29 +00:00
|
|
|
color: MoneroComponents.Style.titleBarButtonHoverColor
|
2018-08-05 20:54:11 +00:00
|
|
|
radius: 4
|
|
|
|
border.color: MoneroComponents.Style.inputBorderColorInActive
|
|
|
|
border.width: 1
|
2018-12-29 23:24:39 +00:00
|
|
|
|
2018-08-05 20:54:11 +00:00
|
|
|
signal linkActivated;
|
2018-12-29 23:24:39 +00:00
|
|
|
|
2018-08-05 20:54:11 +00:00
|
|
|
RowLayout {
|
|
|
|
id: warningLayout
|
|
|
|
spacing: 0
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
|
|
|
Image {
|
|
|
|
Layout.alignment: Qt.AlignVCenter
|
2019-04-25 19:09:23 +00:00
|
|
|
Layout.preferredHeight: 33
|
|
|
|
Layout.preferredWidth: 33
|
|
|
|
Layout.rightMargin: 12
|
|
|
|
Layout.leftMargin: 18
|
|
|
|
Layout.topMargin: 12
|
|
|
|
Layout.bottomMargin: 12
|
2019-04-11 01:17:29 +00:00
|
|
|
source: "qrc:///images/warning.png"
|
2018-08-05 20:54:11 +00:00
|
|
|
}
|
|
|
|
|
2019-11-27 18:00:51 +00:00
|
|
|
Text {
|
2018-08-05 20:54:11 +00:00
|
|
|
id: content
|
|
|
|
Layout.fillWidth: true
|
|
|
|
color: MoneroComponents.Style.defaultFontColor
|
|
|
|
font.family: MoneroComponents.Style.fontRegular.name
|
|
|
|
font.pixelSize: root.fontSize
|
|
|
|
horizontalAlignment: TextInput.AlignLeft
|
|
|
|
textFormat: Text.RichText
|
|
|
|
wrapMode: Text.WordWrap
|
2019-04-25 19:09:23 +00:00
|
|
|
leftPadding: 4
|
|
|
|
rightPadding: 18
|
|
|
|
topPadding: 10
|
|
|
|
bottomPadding: 10
|
2018-08-05 20:54:11 +00:00
|
|
|
onLinkActivated: root.linkActivated();
|
|
|
|
|
2019-11-27 18:00:51 +00:00
|
|
|
MouseArea {
|
|
|
|
anchors.fill: parent
|
|
|
|
acceptedButtons: Qt.NoButton
|
|
|
|
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
|
|
|
|
}
|
2018-08-05 20:54:11 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|