Skip to content

Commit 515e2fa

Browse files
committed
qml: make external links follow the specs in the design file
1 parent b73cd4d commit 515e2fa

File tree

2 files changed

+17
-20
lines changed

2 files changed

+17
-20
lines changed

src/qml/components/AboutOptions.qml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ ColumnLayout {
1717
parentState: websiteLink.state
1818
description: "bitcoincore.org"
1919
link: "https://bitcoincore.org"
20-
iconSource: "image://images/caret-right"
2120
}
2221
onClicked: loadedItem.clicked()
2322
}
@@ -29,7 +28,6 @@ ColumnLayout {
2928
parentState: sourceLink.state
3029
description: "github.com/bitcoin/bitcoin"
3130
link: "https://github.com/bitcoin/bitcoin"
32-
iconSource: "image://images/caret-right"
3331
}
3432
onClicked: loadedItem.clicked()
3533
}
@@ -41,7 +39,6 @@ ColumnLayout {
4139
parentState: licenseLink.state
4240
description: "MIT"
4341
link: "https://opensource.org/licenses/MIT"
44-
iconSource: "image://images/caret-right"
4542
}
4643
onClicked: loadedItem.clicked()
4744
}
@@ -54,6 +51,8 @@ ColumnLayout {
5451
description: "v22.99.0-1e7564eca8a6"
5552
link: "https://bitcoin.org/en/download"
5653
iconSource: "image://images/caret-right"
54+
iconWidth: 18
55+
iconHeight: 18
5756
}
5857
onClicked: loadedItem.clicked()
5958
}

src/qml/controls/ExternalLink.qml

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ AbstractButton {
1212
required property string link
1313
property string description: ""
1414
property int descriptionSize: 18
15-
property url iconSource: ""
16-
property int iconWidth: 18
17-
property int iconHeight: 18
15+
property url iconSource: "image://images/export"
16+
property int iconWidth: 22
17+
property int iconHeight: 22
1818
property color iconColor
1919
property color textColor
2020
state: root.parentState
@@ -66,21 +66,19 @@ AbstractButton {
6666
}
6767
}
6868
}
69-
Loader {
70-
Layout.fillWidth: true
71-
active: root.iconSource.toString().length > 0
72-
visible: active
73-
sourceComponent: Button {
74-
icon.source: root.iconSource
75-
icon.color: root.iconColor
76-
icon.height: root.iconHeight
77-
icon.width: root.iconWidth
78-
background: null
79-
onClicked: root.clicked()
69+
Button {
70+
leftPadding: 0
71+
topPadding: 0
72+
bottomPadding: 0
73+
icon.source: root.iconSource
74+
icon.color: root.iconColor
75+
icon.height: root.iconHeight
76+
icon.width: root.iconWidth
77+
background: null
78+
onClicked: root.clicked()
8079

81-
Behavior on icon.color {
82-
ColorAnimation { duration: 150 }
83-
}
80+
Behavior on icon.color {
81+
ColorAnimation { duration: 150 }
8482
}
8583
}
8684
}

0 commit comments

Comments
 (0)