Add support for website links

This commit is contained in:
Floris Bos 2021-05-07 13:10:23 +02:00
parent 86cf72bec2
commit 4a039b7885
5 changed files with 22 additions and 3 deletions

7
debian/changelog vendored
View file

@ -1,3 +1,10 @@
rpi-imager (1.6.2) unstable; urgency=medium
* Add website link support
* Add CLI support
-- Floris Bos <bos@je-eigen-domein.nl> Fri, 07 May 2021 13:19:19 +0200
rpi-imager (1.6.1) unstable; urgency=medium rpi-imager (1.6.1) unstable; urgency=medium
* When saving advanced options delay modifying files * When saving advanced options delay modifying files

BIN
icons/ic_info_12px.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 B

BIN
icons/ic_info_16px.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 692 B

View file

@ -374,6 +374,7 @@ ApplicationWindow {
name: qsTr("Back") name: qsTr("Back")
description: qsTr("Go back to main menu") description: qsTr("Go back to main menu")
tooltip: "" tooltip: ""
website: ""
} }
} }
@ -414,6 +415,7 @@ ApplicationWindow {
name: qsTr("Erase") name: qsTr("Erase")
description: qsTr("Format card as FAT32") description: qsTr("Format card as FAT32")
tooltip: "" tooltip: ""
website: ""
} }
ListElement { ListElement {
@ -479,8 +481,11 @@ ApplicationWindow {
font.family: roboto.name font.family: roboto.name
textFormat: Text.RichText textFormat: Text.RichText
text: { text: {
var txt = "<p style='margin-bottom: 5px;'><b>"+name+"</b></p>" var txt = "<p style='margin-bottom: 5px; font-weight: bold;'>"+name
txt += "<font color='#1a1a1a'>"+description+"</font><font style='font-weight: 200' color='#646464'>" if (typeof(website) == "string" && website) {
txt += " &nbsp; <a href='"+website+"'> <img src='icons/ic_info_16px.png' align='top'></a>"
}
txt += "</p><font color='#1a1a1a'>"+description+"</font><font style='font-weight: 200' color='#646464'>"
if (typeof(release_date) == "string" && release_date) if (typeof(release_date) == "string" && release_date)
txt += "<br>"+qsTr("Released: %1").arg(release_date) txt += "<br>"+qsTr("Released: %1").arg(release_date)
if (typeof(url) == "string" && url != "" && url != "internal://format") { if (typeof(url) == "string" && url != "" && url != "internal://format") {
@ -496,6 +501,7 @@ ApplicationWindow {
return txt; return txt;
} }
id: osText
/* /*
Accessible.role: Accessible.ListItem Accessible.role: Accessible.ListItem
@ -538,7 +544,11 @@ ApplicationWindow {
} }
onClicked: { onClicked: {
selectOSitem(model) if (osText.hoveredLink) {
Qt.openUrlExternally(osText.hoveredLink)
} else {
selectOSitem(model)
}
} }
} }
} }

View file

@ -26,5 +26,7 @@
<file>countries.txt</file> <file>countries.txt</file>
<file>timezones.txt</file> <file>timezones.txt</file>
<file>UseSavedSettingsPopup.qml</file> <file>UseSavedSettingsPopup.qml</file>
<file>icons/ic_info_16px.png</file>
<file>icons/ic_info_12px.png</file>
</qresource> </qresource>
</RCC> </RCC>