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

42 lines
938 B
QML
Raw Normal View History

2017-07-03 09:30:10 +02:00
import QtQuick 2.5
2017-12-20 14:54:05 +01:00
import "." as Gov
2017-07-03 09:30:10 +02:00
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: bodyText
anchors.top: parent.top
anchors.left: parent.left
anchors.leftMargin: margin
anchors.right: parent.right
anchors.rightMargin: margin
2017-12-20 14:54:05 +01:00
font.pixelSize: Gov.Constants.normal_font_size
2017-07-03 09:30:10 +02:00
font.capitalization: fontUppercase
2018-03-28 15:10:51 +02:00
color: Gov.Constants.secondary_text
2017-07-03 09:30:10 +02:00
wrapMode: Text.WordWrap
onLinkActivated: parent.linkActivated(link)
}
Text {
id: labelText
anchors.top: bodyText.bottom
anchors.left: parent.left
anchors.leftMargin: margin
anchors.right: parent.right
anchors.rightMargin: margin
2017-12-20 14:54:05 +01:00
font.pixelSize: Gov.Constants.label_font_size
color: Gov.Constants.blue
2017-07-03 09:30:10 +02:00
wrapMode: Text.WordWrap
}
}