mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
update: text and some fixes
This commit is contained in:
@@ -7,12 +7,13 @@ import Style 1.0
|
||||
|
||||
import "../Controls2"
|
||||
import "../Controls2/TextTypes"
|
||||
|
||||
import "../Config"
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
|
||||
property bool linkEnabled: false
|
||||
|
||||
property string textColor: AmneziaStyle.color.paleGray
|
||||
|
||||
property string textString
|
||||
@@ -33,23 +34,15 @@ Rectangle {
|
||||
|
||||
RowLayout {
|
||||
id: content
|
||||
width: parent.width
|
||||
anchors.fill: parent
|
||||
|
||||
anchors.leftMargin: content.width / 4
|
||||
anchors.rightMargin: content.width / 4
|
||||
anchors.topMargin: 4
|
||||
anchors.bottomMargin: 4
|
||||
anchors.centerIn: parent
|
||||
|
||||
spacing: 0
|
||||
|
||||
Image {
|
||||
Layout.alignment: Qt.AlignTop
|
||||
width: root.iconWidth
|
||||
height: root.iconHeight
|
||||
|
||||
width: iconWidth
|
||||
height: iconHeight
|
||||
|
||||
source: iconPath
|
||||
source: root.iconPath
|
||||
}
|
||||
|
||||
CaptionTextType {
|
||||
@@ -58,9 +51,17 @@ Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.leftMargin: 8
|
||||
|
||||
text: textString
|
||||
textFormat: root.textFormat
|
||||
color: textColor
|
||||
text: root.linkEnabled ? root.textString
|
||||
+ qsTr(" <a href=\"learnMore\" style=\"text-decoration:none; color:%1\">Learn more</a>").arg(AmneziaStyle.color.goldenApricot)
|
||||
: root.textString
|
||||
textFormat: Text.RichText
|
||||
color: root.textColor
|
||||
|
||||
onLinkActivated: function(link) {
|
||||
if (link === "learnMore") {
|
||||
console.log("Learn more pressed")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user