1
mirror of https://github.com/monero-project/monero-gui synced 2024-12-26 01:23:44 +01:00
monero-gui/components/WarningBox.qml

63 lines
1.7 KiB
QML
Raw Normal View History

2019-04-11 03:17:29 +02:00
import QtQuick 2.9
import QtQuick.Layouts 1.1
import QtQuick.Controls 2.0
import "." as MoneroComponents
Rectangle {
id: root
property alias text: content.text
property alias textColor: content.color
2019-04-25 21:09:23 +02:00
property int fontSize: 15
Layout.fillWidth: true
Layout.preferredHeight: warningLayout.height
2019-04-11 03:17:29 +02:00
color: MoneroComponents.Style.titleBarButtonHoverColor
radius: 4
border.color: MoneroComponents.Style.inputBorderColorInActive
border.width: 1
signal linkActivated;
RowLayout {
id: warningLayout
spacing: 0
anchors.left: parent.left
anchors.right: parent.right
Image {
Layout.alignment: Qt.AlignVCenter
2019-04-25 21:09:23 +02:00
Layout.preferredHeight: 33
Layout.preferredWidth: 33
Layout.rightMargin: 12
Layout.leftMargin: 18
Layout.topMargin: 12
Layout.bottomMargin: 12
2019-04-11 03:17:29 +02:00
source: "qrc:///images/warning.png"
}
Text {
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 21:09:23 +02:00
leftPadding: 4
rightPadding: 18
topPadding: 10
bottomPadding: 10
onLinkActivated: root.linkActivated();
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.NoButton
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
}
}
}
}