AusweisApp2/resources/qml/Governikus/Provider/ProviderContactInfoItem_tab...

43 lines
884 B
QML
Raw Normal View History

2017-07-03 09:30:10 +02:00
import QtQuick 2.6
2017-12-20 14:54:05 +01:00
import Governikus.Global 1.0
2017-07-03 09:30:10 +02:00
2017-07-03 09:33:28 +02:00
Rectangle {
2017-07-03 09:30:10 +02:00
id: baseItem
2017-07-03 09:33:28 +02:00
property alias imageSource: image.source
property alias itemText: text.text
property url link
2017-12-20 14:54:05 +01:00
property int sizeRecudctor: 0
height: text.height + Utils.dp(20)
2017-07-03 09:30:10 +02:00
2017-07-03 09:33:28 +02:00
2017-12-20 14:54:05 +01:00
Image {
id: image
width: Utils.dp(25) - baseItem.sizeRecudctor
height: width
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
fillMode: Image.PreserveAspectFit
2017-07-03 09:30:10 +02:00
}
2017-12-20 14:54:05 +01:00
2017-07-03 09:33:28 +02:00
Text {
id: text
2017-12-20 14:54:05 +01:00
anchors.left: image.right
2017-07-03 09:33:28 +02:00
anchors.leftMargin: Utils.dp(10)
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
2017-12-20 14:54:05 +01:00
font.pixelSize: Constants.normal_font_size - baseItem.sizeRecudctor
2017-07-03 09:33:28 +02:00
color: "white"
linkColor: color
elide: Text.ElideRight
wrapMode: Text.WordWrap
}
MouseArea {
anchors.fill: parent
enabled: !!baseItem.link
onClicked: Qt.openUrlExternally(baseItem.link)
}
2017-07-03 09:30:10 +02:00
}