AusweisApp2/resources/qml/Governikus/Global/+ios/LabeledText.qml

42 lines
917 B
QML
Raw Normal View History

2017-07-03 09:30:10 +02:00
import QtQuick 2.5
import "."
Item {
property alias label: labelText.text
property alias text: bodyText.text
2017-07-03 09:33:28 +02:00
property alias textFormat: bodyText.textFormat
2017-07-03 09:30:10 +02:00
property int margin
property int fontUppercase
signal linkActivated(string link)
height: childrenRect.height + margin
Text {
id: labelText
anchors.top: parent.top
anchors.left: parent.left
anchors.leftMargin: margin
anchors.right: parent.right
anchors.rightMargin: margin
2017-07-03 09:33:28 +02:00
font.pixelSize: Constants.normal_font_size
2017-07-03 09:30:10 +02:00
color: Constants.blue
wrapMode: Text.WordWrap
}
Text {
id: bodyText
2018-03-28 15:10:51 +02:00
color: Constants.secondary_text
2017-07-03 09:30:10 +02:00
anchors.top: labelText.bottom
anchors.left: parent.left
anchors.leftMargin: margin
anchors.right: parent.right
anchors.rightMargin: margin
font.pixelSize: Constants.normal_font_size
font.capitalization: fontUppercase
wrapMode: Text.WordWrap
onLinkActivated: parent.linkActivated(link)
}
}