1
0
mirror of https://github.com/QRouland/UTPass.git synced 2025-01-26 00:26:40 +00:00
UTPass/qml/components/ExternalLink.qml

64 lines
1.6 KiB
QML
Raw Normal View History

2019-09-20 21:29:39 +02:00
import "../styles"
2025-01-10 15:28:42 +01:00
import Lomiri.Components 1.3
import QtQuick 2.4
2019-09-20 21:29:39 +02:00
Item {
id: externalLink
property string url
property string text
property bool commonBorder: true
property int lBorderwidth: 0
property int rBorderwidth: 0
property int tBorderwidth: 0
property int bBorderwidth: 0
property int commonBorderWidth: 0
property string borderColor: LomiriColors.warmGrey
2019-09-20 21:29:39 +02:00
width: parent.width
height: units.gu(6)
Rectangle {
anchors.fill: parent
color: theme.palette.normal.background
2019-09-20 21:29:39 +02:00
Text {
text: externalLink.text
anchors.left: parent.left
anchors.leftMargin: units.gu(2)
anchors.verticalCenter: parent.verticalCenter
color: theme.palette.normal.backgroundText
2019-09-20 21:29:39 +02:00
}
Icon {
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
anchors.rightMargin: units.gu(2)
width: units.gu(4)
height: units.gu(4)
name: "go-next"
color: LomiriColors.orange
2019-09-20 21:29:39 +02:00
}
MouseArea {
anchors.fill: parent
onClicked: {
2025-01-10 15:28:42 +01:00
Qt.openUrlExternally(externalLink.url);
2019-09-20 21:29:39 +02:00
}
}
CustomBorder {
id: cb
2025-01-10 15:28:42 +01:00
2019-09-20 21:29:39 +02:00
commonBorder: externalLink.commonBorder
lBorderwidth: externalLink.lBorderwidth
rBorderwidth: externalLink.rBorderwidth
tBorderwidth: externalLink.tBorderwidth
bBorderwidth: externalLink.bBorderwidth
borderColor: externalLink.borderColor
}
2025-01-10 15:28:42 +01:00
2019-09-20 21:29:39 +02:00
}
2025-01-10 15:28:42 +01:00
2019-09-20 21:29:39 +02:00
}